In order to greet someone and have a simple conversation in Spanish you have to know:
How to say Hello in Spanish
How to Ask someone their name
How to ask someone how they are doing.
You can say hello to someone by saying one of the following greetings according to the time of day:
¡Hola! = Hello (Anytime)
¡Buenos dias!= Good Morning
¡Buenas Tardes!= Good Afternoon
¡Buenas noches!= Goodnight
When asking someone their name in Espanol you say ¿Como Te llama?
There are two ways to ask someone their name. When speaking to an adult to say ¿Come se llama?
When speaking to an peer you say ¿Como te llama?
If someone was to ask you ¿Como te llama?, meaning "What's your name", you would say in respone
"Me llama es ___(your name)"
Finally if someone ask you your name and you want to know what's theirs in return you say (if adult) ¿Como se llama (Usted)? or just ¿Y Usted?. When asking a peer what's their name in response you say ¿Como te llamo (tu)?, or just ¿Y tu?.
¿Y? Makes the E sound
When asking someone how they are doing you say:
Ways to tell someone how you are doing:
(Muy) Bein, gracias = (Very) Good thankyou
Mas o menos. = Regular/fine/okay/average
(Muy) Mal = (Very) Terrible
Just like the names, if someone ask you how you're doing and you want to know how they're doing in return you say:
¿Como estas(tu)? or just ¿Y tu? (peer).
When asking an adult you say ¿Como esta (usted)? or just ¿Y Usted?
Now here's a video of two people meeting for the first time greeting each other in Espanol