The phrases you'd use to apologize with are those that express regret. Any of the following terms are probably acceptable:
- I apologize. (or I'd like to apologize for...)
- Pardon me.
- Please excuse me.
- Please forgive me.
- I'm sorry.
Note: I'd personally recommend avoiding sorry, because the second meaning of the word has a negative connotation and may not be accepted as an apology.
- My bad!
Note: This is obviously informal. It will work in some parts of the world or with certain people, but should probably be avoided unless you hear them use it first.
When apologizing, you should generally use two parts. The first part expresses regret, most likely using one of the prior phrases, and for the second part, explain what regret you have. You might use one of these phrases:
I didn't mean to spit on you.
I didn't mean to get spittle/snot/whatever all over you.
I didn't mean to spray you.
Honestly, apologizing is more about the sincerity in your voice than the exact words used. As long as you mean what you say, you'll probably be okay. It's also perfectly acceptable to state the perceived offense first, and then express regret afterwards. This format generally has the benefit of less confusion, since you're stating what you felt you did wrong, followed by an appeal for forgiveness/dismissal of the offense.
So, in conclusion, your apology might sound something like:
a) I'd like to apologize for getting spit on you.
b) I didn't mean to spit on you. I apologize.
c) I apologize. I didn't mean to get spit on you.
d) Oops! I didn't mean to spit on you!
e) I didn't meant to get spittle all over you. Please forgive me.