It doesn't. You either have to use the TM on it, or breed it onto a baby Numel.
Yes, Numel can learn Dig, but it can only learn Dig by using the TM and not by leveling up.
Numel learns magnitude at Lv:19
in level 45
At level 19
At level 40 it will want to learn dig
Groudon can learn TM28- Dig.
Camerupt can learn Dig by using the TM Dig. It cannot learn Dig by leveling up.
Numel evolves at level 33
numel evolves at level 33
Numel evolves into Camerupt at level 33.
Nincada learns dig at level 45.
Linoone does not learn Dig by leveling up, instead it needs the TM to learn Dig.