Cut the butter into pieces and place in a small saucepan over low heat.
Melt the butter slowly without stirring.
Use a wooden spoon to skim off any white “foam” from the top of the melted butter; discard that stuff.
After a minute you will see a layer of solids begin to settle at the bottom of the pot.
For clarified butter: remove the pot from the heat now and gently pour the butter fat into a clean jar, leaving the milk solids behind in the bottom of the pot.
For ghee: continue cooking, without stirring, over the lowest heat possible, until the butterfat takes on a slightly darker golden color. This will take about 10 minutes. Pour the butterfat carefully out into a jar, again leaving the solids behind.
Let the clarified butter or ghee cool at room temperature, then screw on the lid and refrigerate.