'hi' is an interjection used to express an informal greeting, as in a pleasant acknowledgement of someone’s presence. It may be used to greet someone who has just arrived, or as an invitation to come over and join a group. It may also be used as a casual farewell.
'hi' can be used in any informal situation, and is generally uttered with a higher intonation and a friendly attitude.
1. Hi, what’s your name?
2. Hi, how can I help you?
3. Hi, I’ll see you later!
Hi should generally not be used in a formal setting. If used in a professional context, it may give the impression that the speaker is not taking things seriously. It may also appear unprofessional to write a greeting like 'Hi' as opposed to 'Hello' in emails and other messages.