Call the theater. Most theaters on and off Broadway will sell tickets to their plays. If you buy your tickets directly from the theater, there is usually no surcharge. This does not apply to online sales.
Buy your tickets online. Some websites, such as StubHub have seats available as late as the night before and for a small discount (see Resources below).
Ask the concierge. If you are staying in a hotel in the city, the concierge can call and book tickets for you. Also, some hotels have tickets to big plays on reserve for their guests.
Try your luck at the ticket booth the night of the show. If there are any seats available for that night's performance, you can get them at the ticket booth of the theater. If the show is sold out, you may still be able to get same-day standing room only tickets. As you can imagine, this isn't the most comfortable way to see a show, but it is cheap.
Stand in line at the TKTS booth in Times Square. The discount ticket booth is open every day at 3 p.m. for evening shows, at 10 a.m. for the Wednesday matinee and 12 noon for the Sunday matinée. You probably won't get tickets to the biggest, sold-out show, but the smaller, or longer running shows will usually have something available at the booth. Be advised that the TKTS booth only takes cash and traveler's checks.