If your adult cat suddenly starts peeing in the house, try to catch it doing it. It could be a medical problem and if you notice that a male cat is doing a few drops here and there, consider is as a medical emergency. Urinary blockage can be fatal.
There are also behavioural causes, why a cat or dog start soiling the house. Any sudden changes in its routine, can cause a pet to change its habits.
Both cats and dogs will normally want to mark spots as territorial marking, and this is not the same as urinating. You will need to observe carefully. This often happens if there is a new person or new pet in the house, but at times it is simply a sign of stress or anxiety. Maybe there are loud construction noises when the pet is alone, or that they are suffering from Separation Anxiety.
Maybe you have been very busy and have been giving very little time to the pet, and if it is a dog, time for walking or running is very important. Most of all, time for brushing, or a few hugs will not go astray with any cat or dog.
Male and Not Neutered
As a general rule, if a dog is male, not neutered, and small it is more likely to mark its territory than females. For a cat, it is the same except that the size of a cat is not as relevant.
Sometimes a female dog will mark to flag her availability, although it will rarely do it inside the house if it is house trained
Neutering is not a magic cure, but it is likely to be more difficult to re-train a complete male pet.
It is imperative that you erase all smell from places they have soiled. A cat or dog's heightened smell is much more keen than ours, so cleaning is not enough. There are commercial preparations for this, or you may have your own favourite mix. A fresh sprinkle of pepper will keep most pets off, but it needs to be refreshed daily..
This article may shed more light on the subject for you -
Tails 'speak' loud in both cats and dogs. As a general rule quick swaying or moving or tail wagging may spell happy. However, if the tail is high up and the wagging is fast, or even flicked in a whip like manner then I would think "Angry, Aggressive".
It is most important to take note of its environment . If a dog sways its tail at the sound of its leash in your hands, you can accept that it is happy, but if the dog's tail is wagging, high up and fast with a dominant stance, then I would opt for aggression rather than happy excitement.
When a cat displays a tail trashing back and forth, it is agitated. The quicker the tail, the more agitated it is.
When it is happy the tail is usually up and quivering.
Scared or anxious? The tail is likely to be Held very low or tucked between legs: insecure or anxious
When a pet wants to play Boss, it will stand tall. When, on the other hand, it is feeling worried, frightened, or simply being shy, it will go low and drop its tail as if to make itself invisible.
If it is very scared and feeling anxious, it could even roll onto its back. It is adopting a vulnerable position to say "I am no threat" and hope that you or any other animal there will treat it gently.
Some pets know well enough that if they roll onto their back their 'human' is likely to caress or rub their belly, under arms etc. . . They all love that, and it is not anxiety but sweet 'manipulation' to get what they love.