Just melt the butter in a pan and simmer it until the milk solids are dark brown. They will form little clumps. Then strain the whole thing - I use a mesh strainer lined with a couple paper towels. The milk solids will catch in the strainer and the ghee will filter through.
Be careful though. the ghee is insanely hot - so cool it for a bit before straining - and then still be careful. The burns from hot butter are not nice.