Codeine is an opioid medicine used to treat moderate-to-severe pain. This medicine may be available in both an instant release tablet and an extended release tablet form. The amount of codeine in each dose will depend on what type of tablet you pick.