When it comes to formal or informal letters, there are several differences.
A letter to family members, friends or acquaintances is informal, while one to your current or future employer, teacher, is formal.
Informal letters are often hand written or sent on a postcard, but a formal letter needs to be printed out on a computer and sent in an envelope.
Formal letters are for example letters of resignation, letters of complaint, letters of request, cover letters and so on.
In a formal letter you always have to begin with Dear Mr/ Ms/ Mrs etc, while in an informal one it is enough if you use Hi or Hello, or if you use the first name of the person such as Dear Mary. Similarly, when closing the letter, in a formal letter you use terms such as Yours sincerely, Sincerely, Yours faithfully, while in an informal one you can use terms such as See you, Bye, All the best or nothing at all.
The style of an informal letter is chatty, often colloquial, while in a formal letter it is professional and very polite. In a formal letter you use full sentences and you avoid making remarks, being cynical, funny, or too friendly. For example while in an informal letter it is OK to say Please write to me or Sorry for writing only now, in a formal letter you need to say I would greatly appreciate your response or I apologize for my late response.
In an informal letter information is not the most relevant part: it is sharing feelings, ideas, chatting, describing situations and experiences. In a formal letter you need to go straight to the point, and keep the letter short. It is also essential to sign the letter, giving information such as full name, address, and the date.
The structure of a formal letter needs to be quite strict. There should be at least three paragraphs. The first paragraph is where you introduce yourself and you state the reason for your writing. In the second paragraph you elaborate on this reason. For example here you can explain why you are the best candidate if the letter is for a prospective employer. In the last paragraph you finish with a conclusion. An informal letter has no such rigorous layout.