Hello is an informal greeting, termed in the dictionary as an interjection, to express pleasure or surprise. It’s used also to attract attention and generally used in answering the ring of the phone.