This process is used, to add Flavor to food. Almost all over India in all regions this process takes place to enhance the flavor of Vegetables, Daals, Chutneys, Raita and other dishes.
It is important to know about it ahead of time as it takes heating of oil and adding whole spices-sometimes Green Chilies, Curry leaves,Tomatoes, Onions, Garlic ETC. This takes getting used to because when the oil is hot, the items may splatter. It is advisable to keep your self at a safe distance while on Heat.
Each region has different items added in Tadka depending on the dish, but the most basic is, whole black Mustard seeds and whole Cumin seeds. Once you start using this process, and feel comfortable with it, you can become creative and add the items to adopt to the dish you make.
In Northern part of India, Onions and garlic is also used with tadka. Southern Indian Tadka may include shredded coconut and Curry leaves.
Simple rule- Tadka takes place before cooking Vegetable-generally, and it is added on top after cooking Daal.
A special spoon with special handle is also available in Indian market for tadka.
I have added different photos to give you an idea:
This photo has Tadka added after Daal is cooked.