There are several types of midfielders in football, each with different roles & responsibilities.
Central midfielders often control the game’s flow, defensive midfielders focus on protecting the defense and breaking up opposition attacks, attacking midfielders create scoring opportunities, and wide midfielders operate from the flanks, providing crosses into the box.