pain (n.)

late 13c., peine, "the agony suffered by Christ;" c. 1300, "punishment," especially for a crime, "legal punishment of any sort" (including fines and monetary penalties); also "condition one feels when hurt, opposite of pleasure," including mental or emotional suffering, grief, distress; from Old French peine "difficulty, woe, suffering, punishment, Hell's torments" (11c.), from Latin poena "punishment, penalty, retribution, indemnification" (in Late Latin also "torment, hardship, suffering"), from Greek poinē "retribution, penalty, quit-money for spilled blood," from PIE *kwei- "to pay, atone, compensate" (see penal).

The early "punishment" sense in English survives in phrase on pain of death. Also c. 1300 the word was used for the torments of eternal damnation after death. The sense of "exertion, effort" is from late 14c.; pains "great care taken (for some purpose), exertion or trouble taken in doing something" is recorded from 1520s.

 Phrase give (someone) a pain "be annoying and irritating" is by 1895; as a noun, localized as pain in the neck (1924) and pain in the ass (1934), though this last might have gone long unrecorded and be the original sense and the others euphemisms. First record of pain-killer "drug or herb that reduces pain" is by 1845.

pain (v.)

c. 1300, peinen, "to exert or strain oneself, strive; endeavor," from Old French pener (v.) "to hurt, cause pain," from peine, and from Middle English peine (n.); see pain (n.). Transitive meaning "cause pain; inflict pain" is from late 14c. That of "to cause sorrow, grief, or unhappiness" also is from late 14c. In Middle English also "to punish for an offense or fault; to torture, to torment." Related: Pained; paining.

Definitions of pain
pain (n.)
a symptom of some physical hurt or disorder;
the patient developed severe pain and distension
Synonyms: hurting
pain (n.)
emotional distress; a fundamental feeling that people try to avoid;
the pain of loneliness
Synonyms: painfulness
pain (n.)
a somatic sensation of acute discomfort;
as the intensity increased the sensation changed from tickle to pain
Synonyms: pain sensation / painful sensation
pain (n.)
a bothersome annoying person;
that kid is a terrible pain
Synonyms: pain in the neck / nuisance
pain (n.)
something or someone that causes trouble; a source of unhappiness;
Synonyms: annoyance / bother / botheration / infliction / pain in the neck / pain in the ass
pain (v.)
cause bodily suffering to and make sick or indisposed;
Synonyms: trouble / ail
pain (v.)
cause emotional anguish or make miserable;
It pains me to see my children not being taught well in school
Synonyms: anguish / hurt