How to cook brown mustard seeds? Mustard seeds have a rich and spicy flavour and can be used as an alternative to chilli.

In order to get this flavor during cooking. say in a curry, do you need to fine ground the seeds and add them as a powder or can you just add the seeds whole and the boiling will extract this powerful flavour?
Typical in Indian cuisine, and I am sure it would work in other preparations, the first step is to heat some ghee or oil and then add brown mustard seed.  Now, these will pop, so it is helpful to use a lid on the pan.  Once the seeds are finished popping, the lid can be removed and you can continue with additional spices and/or other ingredients.  Just be sure not to burn the seeds.