Can I use peanut butter instead of margarine or butter when cooking?

I am not used to cooking and someone said that peanut butter can be a substitute for normal butter in cooking. I think someone might be pulling my leg, but it is early for April Fools, so I will ask the good people of Y!A.
16 answers 16