Mahmud of Ghazni was the ruler of the Ghaznavid empire from 998-1030 CE. He ruled over a large empire that extended across eastern Iran, Afghanistan and the northwestern part of the Indian subcontinent. He is particularly notorious for his repeated invasion and looting of the wealth of India.
His first invasion of the Indian subcontinent was in 1001 when he invaded the Gandhara kingdom. After that, he repeatedly invaded northern India and conquered various kingdoms like Nagarkot, Thanesar, Kannauj, Gwalior, Ujjain and Somnath. He main objective was to loot the wealth of these kingdoms rather than annex them to his empire. Hence, he would leave these kingdoms in the hands of Hindu vassal rulers but only after extracting valuable tribute. His armies massacred many people during his raids and also destroyed many monuments and temples in these kingdoms. His last major raid in India was in 1024.