Like many animals, cats use their urine to mark their territory, and this is especially so of unneutered tomcats. The flip side of this habit is that cats habitually sniff about to determine if another cat has urinated in the vicinity.
When another cat’s urine has been detected by smell, the cat will then lick up the urine, then move the tip of the tongue against the upper palate. Yes, it does sound disgusting, but the reason he does this is that above the hard palate is the vomeronasal organ, a sense organ that (probably) can tell the cat the sex of the cat who produced the urine. Some scientists consider this organ to be the source of a cat’s sixth sense.