Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
They turn red when exposed to enough moisture; its so Apple can tell if someone spilled water on their device and is now trying to get it replaced as a regular warranty issue. Many people think it happens too easily so there is a sensor inside the device as well which you can make Apple check.
 
Where are they? Relatively simple question but just curious.

Depends on the device and model. See this Apple support article.

EDIT: Sorry, you specified iPhone 5. In any case, the requested info's still in that article.

EDIT 2: Here's the image, to make things easier:

Product Liquid Contact Indicator location iPhone 5

HT3302--iphone_5--mul.png
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.