According to thefreedictionary.com, the proverb "no pain, no gain" means that some amount of suffering is necessary to better one's self. The phrase refers to the idea that people need to push themselves until improvement is achieved.
This phrase is most commonly used in reference to physical activity. A bit of pain is a good thing because it means that gains have been made. For example, an athlete that is sore after doing sprints has taken steps to improve speed.
The saying is less commonly used in other areas, generally in a more metaphoric manner. For example, a student does not actually feel pain when skipping a fun activity to study more. The reference to pain is a metaphor for sacrifice.