So confused..work related

I am so confused. I recently put in notice that I am quitting my job (because the place is a joke) and then my boss calls me this morning saying they're sending me a termination letter in the mail..so I'm fired?? How can someone fire me when I quit? I am so confused. Does this happen a lot?!