We were exploring the attic and found several posts with indented parts covered with some type of black substance. Anyone know what this could be. Thanks!
Pitch. Dried tree sap. That appears to be a rather large "pitch pocket", and other than the size, is perfectly normal.
The other possibility (hard to be sure from this picture) is that it's more of a "bark inclusion" where a dent/scar that had scabbed over on the face of the tree was not removed in planing.
A higher grade of carpenter would probably have tossed that board in the scrap bin, but presumably it met grade for the class of wood required and your house builder was more into budget than "nice." #2 studs can be pretty awful looking and still work.