These days, if you show up an hour or two before your arrival time you'll be totally fine. You still have to make sure to get in line, since there are often more tickets than there are seats, but the day-long lines are gone because (a) Bob isn't there anymore, and (b) audience members used to be seated in the order they arrived, but that isn't the case anymore.
It's usually about 3.5-4 hours between arrival time and actually entering the studio. This time consists of filling out a card with your personal information, getting your name tag, having your picture taken at the green screen and for the producers, doing a contestant interview, and waiting for the show to get set up.
There are restrooms at all points of the wait except while waiting to interview with Stan. There are also a water fountain and snacks available. You'll have to check your phone with security after your interview and pick it up after the show.
Have fun!