Man it was a sad day when the Penguin Forums were closed. There were libraries of knowledge and experience posted on this topic alone in there. Paddy (who posted there) encouraged me to get started in a restaurant and it's what started getting me gigs.
I still haven't put the effort into the Stand up Monte to use it yet. Someday...
I would say that as a young guy, you need think through a couple of things. First is you need to be good. Not the best in the world (as the restaurant is where you will build your chops), but you need to be solid. If you are not, you will spoil the opportunity for other magicians. The second thing is humility. You need to be humble enough to accept the first point. Have you seen American Idol? Someone's mom or friends at school said they were great singers and they get on stage and crash. The only thing that makes it worse is when they cry foul on the judges because of their pride. Don't be that guy. Practice like crazy. Work hard to get really good at a few tricks while you learn new things. I'm a firm believer in always learning -and trying- new things, but you must master a series of strong effects. They need to be deceptive, work every time, and a good presentation (read 'entertaining').
Make your sets as mentioned above. I found that in a busy restaurant I did two effects per table. There is too much going on to do more. At a slower family restaurant that wants to build business then look at doing a bit longer.
The best way to get hired is to know someone as Josh mentioned. Otherwise, you need to write up a resume/bio and a proposal sheet that let's them know about you, your experience and/or magic work history, as well as exactly what you are proposing. Then you need to script a pitch. Write it out and practice it until you know it. Dress in a suit (or dress shirt, tie, and nice slacks at the least). And make an appointment with the manager. Some people say to just show up when it's not busy and meet them and that can work too. Personally I think it shows them more respect if you call ahead.
When you go, bring a note pad (please not on your phone) with your pitch notes on it so you don't miss any details, and offer to show them what you do, then present them the idea confidently. (try to do it in that order -otherwise they will have made up their mind before they see what you can do).
Here's what you will pitch - 'You can make them more money'. That's their bottom line: Magician => unique and better overall experience => happy customers => repeat business => telling and inviting friends (most powerful advertisement tool ever) => more customers => more business and profit for the restaurant.
Do not pitch them that you will wow their customers or make their customers happy. You must take them down the entire path to the conclusion (they will not get there themselves). Then you can also tell them about added benefits like if you perform on slow nights they will bring in more traffic, if you perform on busy nights, you can perform for those who are waiting, servers will get better tips and be happier etc) But ultimately it's about them and their values.
As far as pay goes, this is all over the map with different people and really depends on your experience, the restaurant, the manager, and the geographic location. Some people work only for tips, some minimum wage + tips, others charge $$20, 30 or $50 per hour +tips, and some forgo the tips and just charge a wage (I read one guy who said that he charged one restaurant $100 and no tips). What you do will depend on the place but you need to help them think of it in more tangible terms when you are pitching it. Lets say that you would like to charge $25/ hour. Say the restaurant has an average entree of $25 (roughly $10-$11 profit margin to pay staff and other things out of). People do not dine alone typically, so if two tables of two people each come to the restaurant that week because of you, that's four entrees that are sold with a profit of $40 which more than pays for one hour of work. If you work once a week for three hours then it only takes two tables of four to pay for your service - everything above that is gravy for them. And if you are good, then you will draw many more than that. But you need to break it down and make it tangible for them.
Tips can be tricky. I hate asking for money. I don't busk because I would starve before I would ask - my pride and discomfort get it the way. So I wouldn't work for only tips. But I certainly accept tips (my largest tip was $120, but typically they are $5-$10). I often used to urge them to tip their server well if they enjoyed the show because I was being well paid to perform already, but I find it rude to refuse someone who wants to tip you, so I had an agreement that I could accept tips if offered, but would not solicit them. This made everyone happy. But you can be creative with how you get paid - a meal, tips wage, or any combination of things that you and the owner can come up with.
Bottom line, is that it needs to work with them.
Some say that you should never work for free, and I agree in most cases except where you are. When starting out, you need to just get out and get as much experience as possible. Realistically, if you worked for just tips and only made $10 an hour, it would be worth it because of the experience you would get. In three years of doing that well, you could do larger gigs and charge much much more -something that you can't really do without the experience.
Then once you get the gig, it's all about building your chops, refining effects, trying new stuff, learning your character, and marketing and networking.