First, do not resist. Although you have a right to resist an unlawful arrest, you are usually in no position to determine whether the arrest is lawful or not. Don't take the chance of getting charged with the additional crime of Resisting Arrest. Comply with all police commands, be polite and quiet, and make NO STATEMENTS to police. Ask in a calm and polite manner to have your lawyer present as soon as possible.
Second, as soon as you have the opportunity to make a phone call, call your lawyer first. If you don't have one, ask police to let you speak to a public defender (they are usually on duty at all hours). Don't waste your phone call calling someone who isn't home.
You can usually make arrangements to get bailed out by calling a Bail Bondsman. Be forewarned: they will charge you a non-refundable 10% fee of the bail amount. So if your bail is $100,000, you will have to pay the bondsman $10,000. In many cases a lawyer will be able to either reduce the amount of bail or persuade a judge to release you on your own Personal Recognizance (a PR release). Depending on your finances and patience, you may want to wait till you're brought before a judge so that you can have a lawyer argue for your release. In most cases you'll be brought before a judge on the next business day after your arrest (which is bad news if you're arrested Friday night).