The goal is to remove all cards from the table. You can place a card on top of a card in the foundation if the card is bigger or smaller by one.
Use the mouse to click on a card you want to send up to the foundation, or click on the deck to change the foundation card.