Mounting (also known as "humping" or "hunching") is a normal behavior in both male and female dogs. While it is part of sexual behavior, it does not always occur in a sexual situation. It is common in play between puppies, establishing dominance, as a stress reliever when a dog is excited or over-stimulated, or as an attention-seeking behavior. If this is a new behavior for your dog, you will want to ask your veterinarian to check that no underlying medical conditions could be causing problems. Also, be advised that a spayed female is less likely to display mounting behavior than an intact female.
Make sure that you are not inadvertently reinforcing the mounting behavior by providing a lot of attention when it happens; in general, it is best to ignore such attention-seeking behaviors if you want them to stop. Be sure that your dog is getting enough other attention and plenty of exercise. Also, when the mounting behavior occurs, you can train your dog to offer an alternate behavior that you can reinforce instead; this can be as simple as "sit", "come", or "lie down".