The word literally means strange or bizarre. In the queer community, it means someone who does not fit typical ideas about gender and/or sexual orientation. This includes people who are trans, gay, lesbian, asexual and/or intersex. It is also used by individuals who feel their sexual orientation does not fit into the mainstream categories. One example of this is by heterosexuals who date or marry a trans person pre-transition and are still attracted to them after their transition.
In the past, queer was a slur against trans, gays, and lesbians but the community has recently begun reclaiming the word. Many people are not comfortable using it however, so it is used voluntarily.