Default to a handshake when meeting someone for the first time or in a professional setting. Once you know someone socially, a single cheek kiss (touching cheeks, usually starting right, more of an air kiss than actual contact) is common, between two women, or between a man and a woman. Men greeting men typically stick to a handshake, sometimes with a shoulder pat, unless they’re close friends.
Close friends and family often greet with a hug (abrazo), a loose embrace with a couple of light pats on the back, not a tight squeeze. Let the other person set the tone rather than initiating the warmest option yourself.