Most people think of Minesweeper as a tactical game, so for that reason the first box you open can be important. The best way to start the game is from the center and move towards the borders. This will avoid you getting stuck in a corner and not having to "start" from a new part of the network. If your luck is not great, you can hit the bomb on the first try. So don't be disappointed and restart the game. Each of the numbers you see represents the number of bombs in the adjacent boxes. For example, if you see the number 2, that means there are two bombs in the eight boxes surrounding that number. Here you need to think and guess to determine where the bomb is.
The game will end the moment you open all the boxes, except for the ones with bombs. This means that the number of flags only plays a role in your marking, so if you mark a bomb incorrectly, it will not be game over.