Traditionally when a group approached a marae the visit would have been unexpected and the tangata whenua (hosts) would not know if the manuhiri (visitors) were going to attack them or whether they friendly. The powhiri was used to establish if the manuhiri were friend or foe. Once this was found out then the tangata whenua would formally welcome them, establish their connections with each other, and eventually breathe the same air (hongi - pressing of noses).
The powhiri was and is a powerful way of making people feel welcome. 'Whanaungatanga' (A sense of belonging) and 'Manaakitanga' (the ability to show love and make people feel welcome) are guiding values in the powhiri.
Here is a video of a powhiri. It is in English so we get a sense of what is said during a powhiri.