Hi
You are describing the media playback controls with Control Centre, which is opened by swiping up from the bottom edge of the screen.
When Control Centre is open, to switch to a different pane within Control Centre, swipe left / right within the active pane. To close Control Centre, tap outside of it or swipe down on it.
To avoid opening Control Centre accidentally, be sure not to swipe up on the screen when using the Home button to unlock your iPhone or when handling your iPhone whilst it is locked.
If preferred, to turn off access to Control Centre from the Lock screen:
Go to Settings > Control Centre - turn off Access on Lock Screen.
More information: