On your turn to throw, you may opt to double the stakes (in money or points score) provided the cube is in the center or on your side. How does the cube come to be on your side? We'll see in a moment.
Your opponent may decide to accept the double, in which case she turns the cube (either from 64 to 2, or doubling the current number displayed).The cube moves to her side of the table, and is in her possession.You cannot regain possession until she offers a double at a later point in the game and you decide to accept.
On the other hand, your opponent may decide not to accept the double, in which case the game ends with the point score (or the stakes) being awarded in your favor.
The point to note that you can double only before you throw, and if you have access to the cube. Your opponent can "beaver" (redouble) the stakes before you throw and still retain possession of the cube.