You're doing it right, and the process is the same no matter where the card is issued.
After you give the waitstaff your card, they will run it for an authorization, usually for the amount of your total, or in some cases for the total amount plus an estimate for the tip. This is just an authorization hold, and not a final charge, and will appear as such on your online banking account. It confirms that you have sufficient funds (or credit, in the case of a credit card) and places them on hold so they can't be spent twice. You then receive the credit card slip, write in the desired tip, and sign (remember to take your card back at this point).
Later, the restaurant staff will go back and enter the tip amounts into the point of sale system. The restaurant then settles all the transactions with their merchant bank in one batch process, and the authorization is replaced with an actual transaction for the correct amount, including your tip. This might happen overnight, or it could take a couple of days to be reflected on your account.
Sometimes at restaurants where you pay at the counter, you'll be prompted to select a tip amount directly on the credit card terminal, and the full charge including the tip will be processed immediately.
Note that authorization holds are not uncommon in the US, and pose a special hassle to travelers using debit cards in particular. Hotels often place a hold upon check-in to ensure you can cover any meals and incidental expenses, and gas stations will authorize a sufficient amount to ensure you do not pump fuel that you cannot afford to pay for. Releasing that hold may be near instantaneous or may take a couple of days, depending on whether it was a pin debit transaction or not and the banks involved. Since this is a hold against your bank account, it can cause frustration if your balance is low or you need the funds for something else.