If you notice that your female dog mounts and humps other dogs -- even males -- it isn't a case of gender confusion. Females hump other dogs as a coping mechanism, a way of asserting social dominance and even as a means of experiencing sexual pleasure. While you can ask your vet about possible hormonal imbalances, this is generally a normal behavior that you can curb with proper training.
Both male and female dogs can learn to masturbate for sexual pleasure, which females accomplish by humping. Your female dog's indiscriminate humping may see her mounting people, toys and other dogs -- male and female. In some cases, this masturbatory behavior is motivated by overproduction of estrogen, which your veterinarian can identify and potentially treat. Otherwise, behavioral training can help your dog break the humping habit.
Exploring Social Dominance
Your female dog may start humping males before she even approaches sexual maturity. As puppies begin socializing, they turn play into an opportunity to explore social dominance. Humping is one of the first methods that a puppy learns for demonstrating her social potential to the pack -- by mounting other females and even males, she shows that she is both stronger and more dominant, and therefore fit to take on a leadership role in the group.
Leading the Pack
As an adult, your female dog may continue humping males as a way of asserting herself and showing off her dominance among other dogs. Dogs don't take gender into consideration when deferring to a pack leader -- they're more concerned with size, strength, temperament and other leadership qualities. When the female demonstrates that motivation and assertiveness by mounting and humping another dog -- male or female -- the rest of the pack understands that she is an authority in the group.
Some dogs hump because they don't know how to cope with feelings of excitement or anxiety. Just like sexual humping, this may mean that your female dog mounts toys, people or other dogs -- even males. This may be a response to joyous excitement, like when a familiar face returns home, or stress, like when she meets strange dogs at a dog park. You and your dog can work with a trainer to find other ways of helping her deal with overexcitement and stressful situations.