Why Does Peanut Butter Have Oil on Top?
Oil on top of natural peanut butter is usually separation of the peanuts’ own oils from the solids. The Canadian Food Inspection Agency describes this separation as normal and not itself a health risk.

Separation is not the whole safety check
A normal oil layer does not rule out unrelated damage or spoilage. Check the seal, storage history and manufacturer’s instructions. Discard a product with mold or other clear signs of spoilage instead of assuming every change is harmless separation.
Stir from the bottom
Use a clean, dry utensil and mix the oil into the thicker paste gradually. Scrape the lower part of the jar carefully so the top is not runny while the bottom stays dry. A stable surface and slow movements help prevent spills.
Do not pour it off by default
Removing the oil changes the balance of the product and can leave a dry, difficult-to-spread paste. It also makes the packaged nutrition information less representative of the altered mixture. Stirring restores a more even product; it does not make a contaminated jar safe.
Follow that jar’s storage guidance
Some products recommend refrigeration after opening, while formulations differ. Use the actual label rather than a rule about every food called natural. Cold peanut butter may be firmer. Keep the lid closed and avoid introducing crumbs or moisture with used utensils.
Sources
Canadian Food Inspection Agency.
Related reading
Peanut Butter vs. Powdered Peanut Butter: How to Compare
Tahini vs Peanut Butter: Flavor, Ingredients, and Substitutions