In some countries, such as France and Spain, kissing on both cheeks is a common element to greeting someone. However, rules vary on etiquette. The two-kiss greeting is more common with a familiar person rather than someone the person just met.
For Americans in other countries, it is best to follow the lead of another person when faced with a first encounter. If the other person uses the two-kiss greeting, it is generally acceptable to follow suit. It is also common to offer a similar two-kiss gesture when saying goodbye if the same gesture was used at the time of greeting.