At the very start of the game, after you draw seven cards for your opening hand, you can choose to do mulligan. It usually is done if you are not satisfied with those first seven cards. To do mulligan, discard any number of cards you don't like or need, then draw the same number of cards. Mulligan can only be performed once.
In order to be fair when performing mulligan, make the cards that you discard to be in Closed state until the process is finished. After all players have finished doing mulligan, Open all discarded cards simultaneously.