Cannabutter is a term used to describe butter that is "flavored" with cannabis plant and can be used instead of normal butter in cooking. Cannabutter is typically used in making of space-cakes or some other form of cookies for some special occasions.
To make such delicately flavored substance one needs some butter and some cannabis products such as marijuana or hash. It is a generally good idea to use the unwanted cannabis leaves in the process as they are quite annoying to enjoy otherwise. For ingested cannabis, one needs a little higher amount of spice than when used as incense so i recommend using a factor of 1.5 for making cannabutter. The amount of butter and the cannabis depends on how many of the cookies you'd like to eat to get the desired effect. It is usually good advice to make the amount quite lots, because cannabis OD is not a very pleasant state of mind.
So for the example amounts and the process:
If the recipe of the cookies is made for 24 cookies, needs 100g of butter and you'd like to get enough with 8 cookies and you usually smoke 0.5g of hash you will need (naturally) 100g of butter and (0.5g * 1.5) * (24/8) = 0.75g * 3 = 2.25 g of hash. Put butter on the frying pan and melt it on low temperature, after the butter has melted pour in the cannabis (if using hash, grind it as small portions as you can). Mix up for some 10 minutes in a low temperature and then let it cool. After this you can use the cannabutter as if it was regular butter in everything.
THC is fat soluble so if you were using cannabis leaves and you don't want to have "green butter" with leaves in it, you can pour the melted butter into container with some water and the leaves will float in the water. The water and the butter won't mix up so they are easy to separate from each other after the butter hardens again.
Using cannabis might be illegal in your country so i suggest cooking with cannabutter only where it is not a punishable act.