When you are in a restaurant:
As soon as you are seated, remove the napkin from your place setting, unfold it, and put it in your lap. Do not shake it open. At some very formal restaurants, the waiter may do this for the diners, but it is not inappropriate to place your own napkin in your lap, even when this is the case.
The napkin rests on the lap till the end of the meal. Don’t clean the cutlery or wipe your face with the napkin. NEVER use it to wipe your nose!
If you excuse yourself from the table, loosely fold the napkin and place it to the left or right of your plate. Do not refold your napkin or wad it up on the table either. Never place your napkin on your chair.
At the end of the meal, leave the napkin semi-folded at the left side of the place setting. It should not be crumpled or twisted; nor should it be folded. The napkin must also not be left on the chair.
At a private dinner party:
The meal begins when the host or hostess unfolds his or her napkin. This is your signal to do the same. Place your napkin on your lap, completely unfolded if it is a small luncheon napkin or in half, lengthwise, if it is a large dinner napkin. Do not shake it open.
The napkin rests on the lap till the end of the meal.
The host will signal the end of the meal by placing his or her napkin on the table. Once the meal is over, you too should place your napkin neatly on the table to the left of your dinner plate. (Do not refold your napkin, but don’t wad it up, either.)
See this video on how to use a Napkin
Source: United States Dining Etiquette Guide