There are a few ways to tell, depending on the type of coral you're looking at:
A healthy coral will look "puffy". This is less reliable depending on how stony a coral naturally is, but many LPS-type corals will have flesh that expands and retracts depending on the health of the coral. If the flesh is puffy and swaying with the current, the coral is probably happy. If it's tight up against the skeleton, it might not be as healthy as it should be.
Healthy corals are excellent at fighting off algae. It's one thing if a strand of algae gets dislodged and wraps around the branches of a branching coral, but the algae should not itself be growing on the coral.
The "pattern" of the coral's flesh should extend uniformly around its skeleton. Large discolorations, especially if they're black or white, could indicate a sick coral.
Healthy corals will extend their polyps to search for food. Again, the extent to which you can see this depends on many things, but it's something you'll take note of. If you notice a change in polyp extension, it could be a sign of sickness.
Healthy corals grow. They get bigger, they expand their skeletons, they encrust over surfaces, they sprout new heads. Some corals grow faster than others, but all healthy corals will grow. If you notice that a coral that was growing has stopped growing, you'll want to pay special attention to it.
Corals should pretty much never be white. There are a few corals that might have white growth tips (mostly certain species of acropora), but if white is showing through, it's a sign that your coral is distressed in some way.
For hard corals, if you can see the skeleton, there's a problem. For soft corals, if they look like a withered plant, there's something wrong.