Your dog might have a urinary or track infection, if it is female and not fixed then she might be in heat.
If it is male then it could be a bladder stone. If any of these answers apply then get to a vet ASAP
If it is male then it could be a bladder stone. If any of these answers apply then get to a vet ASAP