Sounds bad, but I was actually wondering the same thing! Not so much so I can swear at people when I go to Mexico...more so I can insult my friends without them knowing I just finished Basic Spanish at school, but of course we never learn this type of thing...
well, for mexico, "chíngate" would probably be more appropriate. and i think they really should teach you all the "bad" words in language classes. if only so you´re at least aware of what they are so you know when someone else says them to you. they´re part of the language - schools need to lighten up about it
Sounds like you're well on your way to building some excellent communication skills and fruitful social relationships. Let me know how that works out for you.
To be fair, you can learn Spanish from classes, internet courses, and books, but rarely do they tell you that kind of thing, so maybe it is that he knows all the other stuff but not that?