There is a subtle difference. An "ache" is usually a chronic discomfort or pain, one that doesn't subside easily just by sitting in a different position or laying down. A "pain" is often something that hurts when you put weight or pressure on it or poke at it, but doesn't hurt as badly if you don't aggravate it.
For example, you might say you have a back ache if you have a constant, dull pain in your lower back that hurts you no matter if you're sitting down, laying down, or standing up. Nothing eases the pain except medication or treatment of some sort.
If you have a sharp pain in your lower back that you feel only when you bend over, then you'd tell your doctor you have back pain, rather than a back ache, and he'd look for a ruptured disc or some other cause (rather than just sore, achy muscles).
Student or Learner