A guarantee is usually free and acts like a promise between the shop and/or manufacturer and you, the customer.
Within a stated limited time, the shop or manufacturer promises to fix any problems with a purchase, or replace it with the same or similar product, or simply to return your money.

In most countries, the consumers’ rights are protected by local legislation. These consumer protection laws vary from one country to another, and from one product group to another. For example, consumer electrical goods are generally expected to last at least a year  and, with or without an explicit guarantee, the customer has the right to have faulty equipment repaired or replaced within 12 months.
The shop may also offer a ‘money-back guarantee‘ on anything it sells, which may be a better deal than the law demands.
Often a guarantee can be used simply by returning the goods with the receipt or proof of purchase, in other cases the guarantee is only valid if the shop has filled in the form which accompanies the purchase.

A warranty, sometimes called an extended guarantee, is a bit more like an insurance policy, sometimes adds to the price of the item, and offers better cover than the law demands.
A warranty is a legal contract between the seller and/or manufacturer and the buyer – so if the item is resold, for example, the warranty may become void.
If you buy a new car, it may come with, for example, a ten-year warranty on the bodywork, but a shorter warranty period on engine parts. Parts which are subject to wear, like tyres, or those with a short lifespan, like headlamp bulbs, may be difficult to get replaced under warranty conditions. You may have to go to court to prove that they were faulty. 

Guarantees and warranties do not replace your consumer rights in any way, but they may improve them.