The Golden Cookie (not to be confused with the Red Cookie) is an object that shows up on the screen in a random position during normal gameplay. It remains on the screen for 13 seconds, slowly fading into nothing (the time it stays on-screen can be increased, see below). If it is clicked before it disappears entirely, it will grant the player one of four semi-random outcomes.
You can see how many Golden cookies you have clicked in the Stats menu. The menu also used to list how many Golden cookies have been missed, but Orteil removed that feature due too many players complaining that it's "messing with their OCD".