Apple - MacBook speakers off, red light coming from the headphone jack
Old question but since I had 5 minutes ago the same problem, I'll post my solution:
The audio output is as Graham Min describes a double output, working for headphone jack or Toslink adaptor. In my case the problem appeared as I disconnected my headphones: OSX didn't switch to integrated output but stayed on digital (optical) output
This page describes an elegant non invasive solution and in my case the solution was as simple as connecting the headphones again, and diconnecting them gently.
Here the steps
Plug your headphones back in.
Play a bit of sound through them (e.g., a song), then stop the sound.
Make sure Preferences is quit.
Launch Preferences and open the Sound pane.
While the Sound pane is open and set to Headphones, pull out the headphone plug from the jack.
It will reset itself to "Internal Speakers" and you are good to go.
You should be able to restore normal audio by selecting Internal Speakers or Line Out in the System Preferences > Sound panel.
The light is because the headphone jack is also a TOSLINK port:
TOSLINK (from Toshiba Link) is a standardized optical fiber connector system. Also known generically as an "optical audio cable" or just "optical cable", its most common use is in consumer audio equipment (via a "digital optical" socket)