You need to get her to a vet to determine if she is in heat or if she has an infection, either uterine if she is not spayed or bladder infection, possible bladder stones.
Infections will also cause a male to try to mount, not just a female being in season. |