TV show tickets are free. A few shows, ask you to write in or call for tickets, but most are represented by an audience company that makes tickets available online in advance. You can order your tickets and print them out at home. If you're already in LA staying at a hotel, you can also ask the concierge or front desk if they can reserve and print the tickets for you, or use the hotel's business center, if available.
For shows that haven't filled up online, you can often find "audience hunters" in front of Grauman's Chinese Theatre distributing same-day tickets.
Audiences Unlimited (www.tvtickets.com) represents a variety of sitcoms and Nickelodeon shows as well as the Dr. Phil Show, The Price is Right and more.
www.tvtix.com also has Dr. Phil and The Price is Right, as well as Deal or No Deal, Craig Ferguson, Bill Maher and last minute Jay Leno tickets, among others.
www.hollywoodtickets.com represents some of the same shows, as well as Jeopardy and Wheel of Fortune tickets.
On Camera Audiences at www.ocatv.com specialize in providing audiences for reality shows.
Jimmy Kimmel Live! (866) JIMMY TIX, (Call weekdays 1-4pm PST) www.1iota.com
Other LA TV show tapings outside of Hollywood that are not listed on the web sites above:
NBC Studios in Burbank:
Tonight Show with Jay Leno Tickets: (818) 840-3537 (also available in person the morning of the show at the NBC Studios in Burbank or at Universal Studios Hollywood ticket booth)
Ellen Tickets: www.ellentv.com or call (818) 260-5600
Last Call with Carson Daly tickets at www.1iota.com or (866) 546-6984.

