Iron pyrites (iron sulfide, FeS2), or 'fool’s gold', is often mistaken for gold because it’s the same ‘metallic’, bright-yellow colour.
To distinguish between fool’s gold and the real thing, smash it with a hammer. Unlike gold, which will just flatten under the hammer, iron pyrites is brittle, and will smash into small pieces.
If you heat iron pyrites to a high temperature, it will give off sulfur, which has a distinctive smell. Gold on the other hand, will just melt at 1 063 ºC.