Malang is a word used for some Sufi saints, quite commonly, as well as a derogatory term sometimes, as a mad or a nomad, though in poetry it is mostly not seen as a derogatory term.
The word can be used in Urdu, Punjabi, and reportedly is also used in Afghani and even Persian, which probably is the root for the word. In Afghanistan, it is said, the word can be used for stage-magicians to sorcerers to beggars to sufi saints to holy men. J.L. Lee's Ancient Supremacy describes Malang as 'malang: a religious mystic, often with heterodox or extreme sufi tendencies; a shrine attendant.'
But then, I don't think we need to do a huge research for our meaning here, as you can see, it's more or less about someone who doesn't much care about his surroundings, someone who is not worldly while living in this world. I hope that's enough to get the meaning of things most of the times.
Entire lyrics of the song Dum Malang Malang from Dhoom 3 HERE.