There are many different ways that people greet each other and say goodbye in Spanish. But not all of it is the same way. The most common phrase is “Buenos dias” Which means good day. Another common phrase is “Buenas tardes” This means Good Afternoon. Another way they greet people is by saying “¿Como está?”, this means how are you? All these phrases are usually used in Mexico. Another type of Spanish is Portuguese, they sound very similar but they do also have a lot of differences. In Portugal to greet each other they say,"Como você está". This means how are you? To say,"Good day". They say,"Dia bom."To say,"Goodbye", they say"Adeus" Just like it would be said in Spanish. To say Goodbye in a more respectful way they say,"Bom dia para você." Which means,"Good day to you." There are many different types of Spanish, all though sounding alike they also have there many differences.
I hope this helped you. I speak fluently in spanish. I suggest you use duolingo to learn spanish. espero que esto te ayude. Hablo fluidamente en español. Te sugiero que uses duolingo para aprender español.