If you want to greet someone is Spanish you could say: "¿Hola cómo está usted?" (Hello how are you?/formal), "¿Cuál es su nombre?" (What is your name?/informal), or "¿Cómo estas guapo/bonita?" (How are you handomse/pretty?/informal) . All of these are examples on how to greet someone in Spanish.
Here are more greetings in Spanish that you can learn:
You can apply this information to a real-life situation by approaching someone attractive and flirt with them to get to know them and ask for a date with them.