CC license

To toast spices on the stove top, place them in a dry, heavy-bottomed pan and cook them briefly (5 to 7 minutes) over low heat, stirring occasionally, until they darken and begin to release their aromas.
Heated mustard seeds will begin to pop, and may jump out of the pan, so have a lid ready.

Oven toasting takes somewhat longer;
Spread the ingredients on a dry cookie sheet and place in an oven preheated to 200 F stir every five minutes or so.
Grind toasted ingredients to a powder with a mortar and pestle, spice grinder, coffee mill (not the same one you use for coffee), or a blender, then pass them through a fine sieve.
Transferred immediately to a dry glass container and store away from moisture, light, and heat.
Toasted and ground spices can maintain their flavour for as long as four months and as short as a few days.