Help understanding circuit in Forrest Mims' Getting Started in Electronics
The only way this works is if the forward voltage on LED2 is higher than that of LED1.  For example, LED2 might be a green or blue LED with a forward voltage of about 3.2V.  LED1 could easily be a red LED with a forward voltage of about 1.7V.  When Q1 turns ON, the forward voltage of LED1 pulls the collector voltage of Q1 below the turn-on voltage of LED2 and it goes out.

Basically, Q1 diverts all available current into LED1, thus turning LED2 off.