The magnesium's oxidation state has increased - it has been oxidised. The hydrogen's oxidation state has fallen - it has been reduced. The chlorine is in the same oxidation state on both sides of the equation - it hasn't been oxidised or reduced.
Example 2:
The reaction between sodium hydroxide and hydrochloric acid is:
Checking all the oxidation states:
Nothing has changed. This isn't a redox reaction.
Example 3:
This is a sneaky one! The reaction between chlorine and cold dilute sodium hydroxide solution is:
Obviously the chlorine has changed oxidation state because it has ended up in compounds starting from the original element. Checking all the oxidation states shows:
The chlorine is the only thing to have changed oxidation state. Has it been oxidised or reduced? Yes! Both! One atom has been reduced because its oxidation state has fallen. The other has been oxidised.
This is a good example of a disproportionation reaction. A disproportionation reaction is one in which a single substance is both oxidised and reduced.