Female dogs generally hump objects if they are in heat, and this includes other dogs, or if the other dog is in heat. Although humping is generally a sexual behavior, it can also be part of the normal play behavior of dogs.
Experts, such as WebMD, say that puppies who hump their littermates, toys or people are practicing for future sexual encounters. Because dogs learn that humping feels good, they will continue to do it even after being spayed or neutered.
Dogs may also hump objects in response to excitement or stress. When a dog meets a new person or another dog, it may get excited or aroused and may hump or mount the other dog, an object nearby such as a toy or bed, or even its owner, which is normal.
Dogs may also have a compulsive disorder that causes them to hump items. This is generally seen among dogs who hump in response to stress. This can interfere with a dog's normal life and should be evaluated by a vet.
It is important to note that sometimes dogs may hump objects, animals and people as a way to show their social status. In the case of dogs humping one another, it can be a way for the dog to exhibit its dominance and control among other animals.