Infliction is when you subject someone to a difficult or unpleasant experience. The infliction of pain on a little kid who needs to get a shot is not fun for him or for his parents.
The noun infliction is good for talking about imposing something negative on someone. You might describe a bully's actions against a smaller child as including both the infliction of pain and the infliction of fear. The Latin root of infliction is inflictionem, or "a striking against," from inflictus, "to strike or dash against." It's important not to confuse infliction with affliction, which means "something that causes pain," but isn't done on purpose.