First, stay calm and prepare to go through a long process of proving yourself innocent. Patience is very important.
Then, get as much information and facts together as you can. For example, even a bus ticket can indicate clearly when and where you were when the crime happened. Whatever info you don't have, at least write it down as a list. Then write a clear statement of your side of the story.
Rely heavily on the hard facts - adjusting your story slightly for whatever reason, exaggerating or hiding information, or giving your personal opinion can be very damaging if you're called into court. Your credibility has to stay solid, and I've seen witnesses taken apart in court over a thoughtless comment or joke.
Legal help is a very good recommendation, but get all your facts together first - it'll save you a lot of time with your lawyer.
Then wish yourself luck!