A Magmato's main method of attack is roll into their enemy. The easiest way to defeat them is to throw Cappy at them to get rid of them.
Upon spotting Mario, Magmatos roll towards him and may even bump into each other, although they cannot roll off edges leading into the lava. If Mario takes control of a Lava Bubble by capturing it, he can leap on top of Magmatos to turn them into puddles of lava, which Mario can use to traverse across solid ground. Jumping on Magmatos normally and hitting them with Cappy can also reduce them to puddles.