The evil looking mushrooms walking around were "goombas." They are enemies, and hurt Mario if he touches them. Mario can kill goombas by stomping on them or hitting them with fireballs.
Also, some levels had giant, platform-like mushrooms which Mario could stand on. These were basically...well, platforms.
The Mushroom Kingdom is filled with fungus!