The underlined phrase 'while studying' is a gerund phrase that functions as an adverbial phrase.
Gerund: Tom visited India while studying the history of Indian art. The phrase 'studying the history of Indian art' is acting as a gerund phrase, which functions as an adverbial phrase modifying the verb 'visited'.