O2 honour the guarantee given with their handsets, so when it breaks within the guarantee period, they will gladly repair or replace it.
I'd like to comment on the previous poster's message that O2 Stores will take a handset and send it away for repair regardless of whether you originally ordered it online or bought it at a store. If you take it to a store they can give you a loan phone (if you ask for it, they don't seem to willingly offer the option
) for a £25 deposit, again regardless of whether you are an online or a store customer.
That said, O2 prefers online customers to send their phones to their freepost repairs address instead of taking them to stores, it seems this way the service is better and takes less time. The repair/replacement time depends on technician workload and stock availability, I had to wait 6 weeks for a new N95, but on another occasion when I took it in for a repair they returned it within 3 days.