Peanut butter is a relatively unprocessed food.
It’s basically just peanuts, often roasted, that are ground until they turn into a paste.
However, this doesn’t apply to many commercial brands of peanut butter that contain various added ingredients, such as sugar, vegetable oils and even trans fat.
Eating too much added sugar and trans fat has been linked to various health problems, such as heart disease. Rather than buying junk food, choose real peanut butter. It should contain nothing but peanuts and maybe a bit of salt.
For all purposes, the health effects of regular peanuts should be almost identical to those of peanut butter since it’s essentially just ground peanuts.