Use your mouse to select a player icon, in the pitch. Hold down the mouse button or use arrow keys to move the player.
Then write the player's name in the search box (at the right) to search for your player.
When you see your player's name in the list, click it to add it in the pitch.
Use the "Change position: ▲ ▼" or PageUp/PageDown to change the player's position.
Click the button to add players at the bench.
With the Delete key (from your keyboard) you can remove the selected player.
Double-click a player to swap him with someone else. Then click another player to apply the swap.
Finally, click one of the "Show..." buttons, to get the desired code.