The purpose of the game is to open all the cells of the board which do not contain a bomb. You lose if you set off a bomb cell.
Every non-bomb cell you open will tell you the total number of bombs in the eight neighboring cells. Once you are sure that a cell contains a bomb, you can long tap to put a flag it on it as a reminder.
Happy mine hunting!