Both are chemical reactions but are the opposite of each other. When oxygen gains electrons, it's called oxidation, and when it loses them, it’s called reduction.