Making a phone call or writing an email is not the best way to quit a job. However, in some situations this can be the only way possible. Remember, if you quit by phone or a message and don't intend to work even a day more, you are risking to lose a reference.
Usually, when resigning is made by phone an employee does not intend to come back. Obviously it would be nice not to leave any personal belongings in the office. Avoid awkward situations by deleting passwords from your computer and taking home all personal possessions.
A Phone Talk
If possible, contact your supervisor, not colleagues. Explain why you are quitting if there is an acceptable reason for it (for example, an accident or a somebody's serious illness). Having no sufficient excuse for leaving, don't make up any, just inform the supervisor that you are leaving.
A recorded message
No need to say, that certain bravery is necessary to male a phone call and just inform your boss you'll never be back. The alternative is to leave a voice mail message. Think carefully if it all worth it. A resignation in a proper way may bring you a good reference. Leaving over the phone is always a risk. Weigh all pros and cons, sometimes there is a zero chance to get a positive reference anyway, in this case you are free to do whatever you want.
It doesn't matter why you took the decision to leave and how happy or unhappy you've been at work, try to stick to formalities. Mention uncontrollable circumstances and apologize for your urgent leaving.
Inform the company what to do with your last salary. Ask to send a pay bill by mail if you've got no direct deposit. If there are some personal belongings you might need in the future, ask if it's possible to get them by mail as well.