What are Credit Note for?

What are Credit Note for?

In our country I've never met such document. So would you be so kind to explain me when can I use it? Where it could be useful? Can someone give me examples of using credit notes?