From the Super Mario Wiki
Tanks are large, segmented and heavily armed land vehicles utilized by Bowser and his armies in Super Mario Bros. 3 and the television show. Tanks are equipped with various artillery, such as cannons, jet engines, Bob-omb launchers and Rocky Wrenches. In addition, some tanks were just mostly square in shape, presumably being the command tank due to the pipe on top. Their texture is the same as that of the airships in Super Mario Bros. 3.
In Super Mario Bros. 3, only two tank companies, which guard Dark Land, appear, the first one being found in the kingdom's first area and the other in the last portion of it; the first company (composed of either 13 tanks (original/All-Stars version) or 10 tanks (Super Mario Advance 4), including one with a flamethrower, one super tank, and one with larger artillery) being commanded by a Boomerang Brother. and the second company being commanded by Boom Boom. The latter company was composed of two regular tanks and three super tanks, the latter of which were named because they were far larger than normal. In addition, airships were seen aiding the latter company, possibly implying that airships and tanks sometimes work together in the same company.
Tanks also appear in The Adventures of Super Mario Bros. 3 episode "Princess Toadstool for President"; here, several Tanks and Rocky Wrenches appear to attack Mario and Luigi when they enter Dark Land.