In basketball or football, getting in an opponent’s way (without the ball) is good defense, but in soccer that’s an “impeding” foul.
But there’s an exception — a player can screen (aka shield) an opponent if the player is near the ball. A good player uses their body to keep an opponent away from the ball, even with some contact and a bit of arms; when I coached, we’d practice screening a lot.
A common mistake is for players to screen when not near the ball. For example, when chasing down a long pass, a player sometimes steps in front of an opponent to slow them down. If the ref calls that, parents often yell “She was just screening!” But if the ball isn’t near, screening isn’t allowed.
Sometimes a screen starts as legal, near the ball, but then the ball rolls away, or the player and opponent move away; if the player keeps screening, the screen becomes impeding.
Note: The official wording for “near the ball” is “playing distance to the ball”. Such distance varies depending on the age and skill of the players.