Well, it had to happen. We have to talk about Freud. We'll start with the Id, Ego, and Superego.
The id represents our basic human instincts. They are drives that want to be satisfied right now . The id is present at birth. Some of the basic drives it represents are food, attention, and sex.
The ego develops as the baby becomes a child. The ego strives to fulfill the needs of the id while staying within socially acceptable behavior. The child realizes that s/he cannot have everything all the time. "I really want that cookie, but if I just take it mom will be mad. I'll try asking politely."
The superego develops when the individual internalizes societal norms and buys into them. The superego can also be seen as our conscious.
The id and the superego are in constant battle... "I really want to take my coworker's Mt. Dew out of the fridge and eat it... but that would be stealing..." In a well balanced individual, the ego is able to negotiate between the id and the superego.
Sublimation is the term used for when one socially unacceptable drive is channeled into a socially acceptable one. The book that I'm working from uses sex as an example, saying that sexual urges are seen as socially inappropriate, so we turn to marriage, in which sex is socially appropriate. I prefer their other example, channeling aggressive or violent behaviors into competitive sports.
Macionis, J. (2008). Sociology (12th ed.) New Jersey: Pearson.