Building the crowd doesn't have to begin with tricks - Sonny Holiday smacks a wand loudly on a table to build the tip, and explains what he's going to do. Some just say "Magic show, magic show! Right here, beginning in a just a moment! You won't want to miss it," and so on. Jimmy Talksalot smacks a wand on the pavement, and stares at the spot until someone stops, and goes into a wand routine. I do a one coin bit while I pitch the amazing magic show that's about to begin.
To keep a crowd, you have to give them a reason to stay. Pitch the ending several times; tell them you'll end with something they'll never forget, something amazing and it begins in just a few moments... (but you really have to do something strong for the ending). Make them want to stay until the end.
What also helps to keep the crowd is a polished show - the blocking and the transitions have to be as good as you can make them, and the only way to do that is through scripting, rehearsal and revision. Not saying "um", making what you say as tight as possible, and as clear as can be is essential; people were going somewhere when you started, and any they won't be shy about leaving if you give them an excuse. If the show slows down for at all, you can lose people. Going out and winging it is not really a good idea.
"Funny is money" they say, and if you're amusing, they'll be more likely to stay.
Tricks that someone can understand halfway through are essential, especially for the first half of your act. This is why cups and balls and chop cup routines are used so often; you can see something disappear and reappear at any time. You need not have seen the beginning to understand what's going on. Learn a few names, and keep calling on them.
Make sure your tricks are big enough to be seen easily, and that you can be heard. If they can't see well enough, or hear you, they'll go.
A 30 minute show is an awful lot of work, and you need a lot of space to get a big crowd. You need a PA to be heard by a big crowd; stick to a sidewalk show of 10 to 12 minutes. Initially, try to get 20 people, to make ten dollars per show, and do two to three shows an hour.
Jim Cellini's book The Royal Touch is also worth your attention, as are his DVDs. Gazzo's Art of Krowd Keeping is pretty highly regarded as well. Jimmy Talksalot has a blog that's well worth a read.