Formal describes a more serious register. We use this for talking to people we don't know or who are in positions of authority. It is also used for talking to people older than us. It shows that we want to respect or impress the audience.
Informal describes a more relaxed register. We use this for talking to people we know well like friends and family. It is also used to talk to people the same age as us or younger. It shows that we feel comfortable with the audience.