Has the kitty been neutered? A male that has not been neutered can act this way if a nearby female is in heat. But otherwise I'd get it to the vet for a check-up, as it could be kitty is in pain for some reason.