Transvestism is literally the practice of cross-dressing, wearing the clothing of the opposite sex, and transvestite literally refers to a person who cross-dresses. However, the word has often had additional connotations.
The term transvestism has undergone several changes of meaning since it was coined in the 1910s, and it is still used in a variety of senses. Therefore it is important to find out, whenever the word is encountered, in which particular sense it is used. However, to understand the different meanings of transvestism it is necessary to explain the development of the term and the reasons behind the changes of meaning.
Magnus Hirschfeld coined the term transvestism (from Latin trans-, "across, over" and vestere, "to dress or to wear") in 1910 in his book "Die Transvestiten : eine Untersuchung über den erotischen Verkleidungstrieb" ("The transvestites : an investigation of the erotic urge to disguise"). He used it to describe persons who habitually and voluntarily wore clothes of the opposite sex. (The distinction between sex and gender had not been made at that time.) Hirschfeld's group of transvestites consisted of both males and females, with (physically) heterosexual, (physically) homosexual, bisexual and asexual orientations. 
Hirschfeld himself was not particularly happy with the term: he understood that clothing was only an outward symbol chosen on the basis of various internal psychological situations. In fact, Hirschfeld helped people to achieve the very first name changes (legal given names were and are required to be gender-specific in Germany) and to get the very first sexual reassignment surgery. Hirschfeld's transvestites therefore were, in today's terms, not only transvestites, but people from all over the transgender spectrum.
Hirschfeld operated very much in a three-gender framework: male; female; and other, or third gender. Included in this third gender were all who, in today's terms, violated heteronormative bounds. Again, in today's terms, this is very much equivalent with the queer community—lesbian, gay, bisexual, and transgender persons. There was, therefore, no pressing reason to find different terms for the different shades of Hirschfeld's transvestism.
Hirschfeld also noticed that sexual arousal was often, but not always, associated with transvestite behaviour; he also clearly distinguished between transvestism as an expression of a person's "contra-sexual" (transgender) feelings and fetishistic behaviour, even if the latter involved wearing clothes of the other sex.
Today, Hirschfeld's use of transvestism is extinct, but the modern term transgender is used in a nearly equivalent sense.
The rise of the Nazis to power and the Second World War had brought an end not only to Hirschfeld's work, but to also most European research in the field of sexuality. In both Europe and North America transvestite behaviour (both by male and female bodied persons) was until the 1960s seen as an expression of homosexuality or suppressed homosexual impulses. Also, the three-gendered framework of Hirschfeld disappeared, and the two-gender framework became the frame of reference again.
In the 1960s Harry Benjamin and others started working with people showing transvestite behaviour again. Trying to press transvestite behaviour into a two-gendered framework produced a very significant result: transsexualism. Unlike Hirschfeld, who had tried to find a social space where third-gendered people could live the way they needed or wanted, people showing other-gendered behaviour now were forced to find a way of living as "proper men" or "proper women". And if a person could not be "cured" of transvestite behaviour, it seemed the best to make them "change sex". Those who refused or were refused this "cure" were labeled either homosexuals or sexual fetishists.
Since transsexual people had and sometimes still have to "prove" that they are not "just transvestites" to get access to medical treatment, people who see themselves as transsexuals occasionally discriminate against anything they see as "transvestism" even more strongly than the public in general.
Social changes brought about the next modifications.
The gay and lesbian rights movement after the Stonewall riots weakened tranvestism's association with homosexuality, since more lesbians and gays became visible and most of them did not show transvestite behaviour. The extreme transvestism that is still associated with the LGBT community, which differs quite obviously from most other forms of transvestism, became known as drag.
That left transvestism as transvestic fetishism, in which transvestic behavior is coupled with, and often necessary for, sexual arousal. However, in most western societies it became almost impossible for women to engage in transvestism, because more and more pieces of male clothing were permitted or even fashionable for them. Also, the distinctive transvestic behaviour of butches in the lesbian community became "politically incorrect" and therefore became rather rare (or went "underground"). All this led to the term transvestism being applied to men or male-bodied persons only, because there seemed to be no need for a word for transvestic female-bodied persons.
Today transvestism is still applied mostly to male-bodied persons. However, some researchers never stopped using the term transvestism for female-bodied persons, and recently some groups of female-bodied transvestites have started to use the term to describe themselves, although the term "drag king" is more common.
After all the changes which took place during the 1970s, a large group was left without a word to describe themselves: heterosexual males (that is, male-bodied, male-identified, gynophilic persons) who wear traditionally feminine clothing. This group was not particularly happy with the term transvestism. Therefore, the term cross-dresser was coined. Nor do those self-identified cross-dressers have any fetishistic intentions. They simply enjoy wearing female clothing at times, and most admire, and imitate, women.
This group did - and sometimes still does - distance themselves strictly from both gay men and transsexual people, and usually also deny any fetishistic intentions. It was probably this development that led to the explicit definition of transvestic fetishism as distinctively different from transvestism.
However, when this group of people achieved public attention, most of the time not the word cross-dressing was used, but transvestism. That led, paradoxically, to yet another usage of transvestism: Today transvestism is sometimes used to describe specifically cross-dressing male-bodied, male identified, heterosexual persons. This group usually self-identifies as "cross-dressers".
Echoing the changing history of the term "transvestism", cross-dressing (but not cross-dresser) is now being used to describe the act of wearing clothing of another gender.
There are some cross-dressers who enjoy going out in public, either to special clubs or organizations or to adult night clubs that welcome the transgender community. They take great care in their choice of clothing, wigs, and makeup, sometimes spending considerable time on transforming their appearance from male to female.
There are many different usages and meanings of the term transvestism. Some of them clearly contradict each other; the only thing they have in common is
They describe a behavior of people dressing in clothes of a gender that is different from the gender they were assigned (usually at birth) or the gender they are living in. It does imply some inner motive for cross-dressing, but does not specify this motive.
They (usually) exclude transvestic fetishism and they usually do not include transsexualism, or transgender people who completely change their gender role.
The word transvestism therefore should be explained when used; most of the time using cross-dressing will avoid much potential confusion. If encountered, it is necessary to find out which particular meaning it has in the context in which it is presented. In scientific literature, cross-dressing has mostly replaced transvestism.
Although the term transvestism was a modern invention, it has exactly the same two Latin roots as the word travesty, which dates from the 17th century. According to the Oxford English Dictionary, the word travesty originally meant "to disguise by changing costume", then "to dress ridiculously", but soon came to mean "a parody or burlesque" and finally added to that its modern meaning of "disgraceful imitation".