Codeine is broken down by the liver into morphine which provides pain relief. Ibuprofen works by blocking the production of prostaglandins, which are involved in mediating inflammation, pain, fever, and swelling. Paracetamol works by blocking the activity of a chemical in the brain that causes pain.