If the tail is broken, you will find that it is painful over the area where the break is. Begain by feeling the tail at its tip and then gradually move your hand up towards his butt squezzing each area gently to see if it is painful at a particular spot. Also lift the tail up with your hand and see if that is painful as that can also suggest a break. If you cannot find a particular area that is painful, it probably is not broken. Be careful as you feel the tail as he may snap at you if you hit a sore spot. It would be a good idea to have someone hold onto his head while you are doing this so no one gets hurt.
Dogs can also get a condition called swimmer's tail if they spend a lot of time in water. This is like a sprain of the muscles of the tail from holding it up while they are swimming. This is a soft tissue injury rather than a break and you will find pain when you lift the tail up and also when you feel close the tail close to the butt.
Also other possible injuries to the tail could include being bitten by another dog. If possible, look closely at the area that appears to be painful to see if there are any wounds. If you find some, it would be a good idea to clean them up the best you can and then have him seen by your vet in the morning as he will likely need some antibiotics.
Dogs will also sometimes hold the tail down if they are experiencing problems with their anal glands. These are two small glands located along side the rectum that produce a foul smelling fluid. If the anal glands become overly full, infected or abscessed, they can hold their tail down. You can look under the dog's tail. If you see swelling along either side of the anus at about the 4 or 8 o'clock position, then anal glands may be the problem. Dogs with anal gland problems often will scoot their butts on the ground or lick a lot under the tail. If you are seeing these things, you will need to have his anal glands checked by your vet. The tail itself is usually not painful with anal gland problems though.
If you are able to localize a painful area and do indeed think that it is broken or that he has swimmer's tail, and assuming that he is a young healthy dog with no significant medical problems and is not on any other medication, it would be okay to give him some aspirin to make him more comfortable tonight. You should use buffered aspirin and give it with food. The dose is one aspirin for approximately 30 - 40 pounds of body weight. Do NOT use Tylenol or any ibuprofen products. I would have him seen tomorrow by your regular vet to make sure that there is not something else going on as well.
I hope this answers your question. If not or if you have additional questions, please let me know.