Tvärtom can mean 'the other way round', 'vice versa' or 'on the contrary' depending on how it's used.
For example: jag jobbar för att leva och inte tvärtom (I work in order to live; not vice versa) or, for Harry Potter fans, det är trollstaven som väljer trollkarlen, och inte tvärtom (it's the wand which chooses the wizard, and not the other way round).
You can also use it as a one-word response, equivalent to 'on the contrary' or 'quite the opposite' in English, although it's more casual than those phrases. For example: hittade du ett jobb i Sverige efter du flyttade hit? – Tvärtom! means 'did you find a job in Sweden after you moved here? – Quite the opposite!'; in other words, you're saying you found the job first and moved after. Or: är du arg på mig? – Nej, tvärtom! ('Are you angry at me? – No, quite the opposite!')
Tvärtom comes from the word tvär, meaning 'cross', and so it means something like 'crossed over'. Tvär comes up in several compound words, such as tvärgata (literally 'cross-street', meaning a street that crosses another, usually larger street), or the instrument tvärflöjt (literally 'cross-flute') which is played by blowing into it from the side.
Tvär can also mean 'sharp' or 'sudden'; for example in the verb tvärbromsa (literally 'to brake sharply/suddenly', or 'to slam on the brakes'). And when you use tvär on its own as an adjective, usually to describe a person, it's a negative term meaning something like sullen/moody/disagreeable, for example han var en tvär typ (he was a disagreeable kind of guy).
But when you use tvärtom, you're talking about flipping a concept or idea mentioned earlier in the conversation on its head.
Det är inte bara invandrare som borde lära sig om den svenska kulturen, utan också tvärtom
It's not only immigrants who should learn about Swedish culture, but also vice versa
Tror du att du pratar bättre svenska efter en öl? Tvärtom!
Do you think you speak better Swedish after a beer? Quite the opposite!