According to WebMD, females dogs hump when they are being courted by a male dog or when they are in heat. Females hump their male counterparts during courtship, and sometimes they engage in this behavior with other female dogs, people or objects.
Mounting and humping in dogs is common in both genders and at all ages, explains WebMD. Even puppies mount each other during play. Psychology Today goes on to point out that mounting and humping is a regular part of normal dog behavior. Not only is it necessary in reproduction, but it also occurs during times of stress, excitement or arousal. Some researchers hypothesize that humping really has to do with aggression and dominance along the same line of posturing. For instance, a dog might hump when other dogs are around to see it.
Psychology Today states that humping in itself is not a bad behavior in a dog, but it can lead to bigger problems. For instance, excessive humping can lead to a compulsion in humping, which borders on rude or bad behavior. It is especially a problem if the dog is making a nuisance of itself in social situations. In order to deal with this behavior in a positive manner, owners need to try to distract the dog or get its attention in another way.