Formal language is used during business meetings, academic atmospheres, and government events. Informal is your everyday chats with your friends, conversations with your family, and at casual parties.
Formal would be "How do you do?" Instead of "What's up?" which is informal.