The first phrases any Spanish learner should master are greetings and expressions of courtesy, since they open and close every social interaction. The universal greeting is Hola, which works in both formal and informal situations. When parting, Adiós is standard, but for a more casual "see you later," Spanish speakers say Hasta luego. Politeness is carried by a small set of essential words: Por favor (please), Gracias (thank you, with Muchas gracias for added emphasis), and the response De nada (you're welcome), which literally means "of nothing." To apologize or get someone's attention, use Perdón after a small bump or a minor mistake, or the more formal Disculpe when speaking to a stranger or elder.
Spanish also divides the day into distinct greeting periods. Buenos días covers the time from sunrise until about noon, Buenas tardes spans the afternoon until sunset, and Buenas noches serves double duty as both an evening greeting and a way to say good night before bed. Notice that Buenas tardes and Buenas noches use the feminine plural Buenas because tarde and noche are feminine nouns.
To ask how someone is doing, Spanish distinguishes between informal and formal address: ¿Cómo estás? is used with friends and family, while ¿Cómo está usted? is reserved for strangers, elders, and professional contexts. A typical reply is Estoy bien, often softened with gracias to sound polite: Estoy bien, gracias. When meeting someone for the first time, the proper response is Mucho gusto ("much pleasure"), or alternatively Encantado if you are male or Encantada if you are female.