I have had interviews cancelled because the candidate has already accepted an offer somewhere else. This doesn't require much protocol: you can call or email, and you're only cancelling an interview. If you send a nice paper letter, you may be thought well of by the people involved, but you don't have to.
However getting two job offers is a little trickier. Once someone has given you a job offer in writing, declining it should at least get the same treatment. If the offer was in email, you can reply in email. Be nice. Tell them why you are declining, in as polite and vague a way as you need to. When I send "sorry, but you didn't get the job" letters to candidates, I say "we have made an offer to another candidate, who has accepted it" so you could say "I have already received and accepted an offer from another company".
Most firms are going to be a little annoyed. Maybe they feel you shouldn't accept that offer right away but should somehow let them know someone else has given you an offer. Maybe they feel you held back information in the interview. This isn't very logical: none of us would tell our children to stop applying for jobs just because they've had an interview, and after all the firm is interviewing lots of candidates. But people aren't always logical. So write a nice letter or email and do it as quickly as you can, so they can make an offer to the second place person while that person is still on the market. Email is good for speed; you can follow up with paper if you want.