Does consuming spicy foods have any effect on relieving pain in the body?

Does consuming spicy foods have any effect on relieving pain in the body?