Modern electronics can be fickle. With so many things to break, it's no surprise that one in four bits of consumer electronics gets returned to the manufacturer at some point in its life. But dealing with customer service is a nightmare of head-banging Greensleeves-playing call-centre torture, and if you're going to survive in that world, you'll need all the help you can get.
There's nothing more ego-bursting than calling up in a righteous rage, only to be stalled for five minutes hunting for the serial number for your device. If you can, get all your receipts and serial numbers to hand before calling. Equally, don't be surprised when they ask you "have you turned if off and back on again", because although you, dear reader, might have a high tech IQ, the poor person on the end of the phone doesn't necessarily know that.
More important than knowing your details, though, is knowing what the warranty covers. Most warranties for mobile phones last for one to two years (you can check here), and cover hardware and software defects with the phone, not accidental damage. For laptops, the warranties can vary from one to three years, ditto with things like monitors or TVs.
If your warranty has run out, however, all's not lost. EU law protects against 'manufacturer defects' for two years after the initial purchase of the good (as long as there's no evidence of mistreatment of the product); there's also a UK law that provides protection for six(!) years after initial purchase, although the 'burden of proof' is on the consumer, not the manufacturer. (Essentially, you'd have to prove that the product was faulty, which in the case of a smartphone, might be rather difficult.) More information on these laws is available here.
One of the many reasons to hate customer service calls is the price of the phone lines. Spend 40 minutes on a 10p-a-minute phone line, and you've pissed away a pint listening to a scratchy rendition of the rejected jingles for a British Airways ad. Often, a bit of sleuthing can find a non-premium-rate number for overseas callers; feel free to use that. Even better, some places have a call-back facility you can plug your phone number in to, or send them an email and ask them to call you.
There's a golden rule when dealing with call centres: don't start swearing at people, because you'll probably be hung up on, or at least passed around the low-level employees until you die of boredom and/or starvation. If you haven't been able to get your problem resolved in a satisfactory manner (sample situation: "Yes, sir, we will replace your laptop. Send it to us with a blank hard-drive, the original box and installation CDs, triplicate proof of ID, and we'll have it returned in 28 working days), point out that that's a load of crap, and ask to escalate your case. (Escalation always works better than screaming "take me to your leader".)
One of the suckiest things is having to go through thirty-three touch-tone menus trying to get to a real person who knows something about your phone. This database has thousands of 'maps' of call-centre phone lines, allowing you to plough through the menus like a pro.
Here's a fun tip: at the beginning of the call, just after they take your name, let the call centre employee know that you're recording the call (preferably say 'recording the call for quality and training purposes'). This will almost certainly get you a more polite, surprisingly efficient service. You don't even have to actually record the call (though it can be good ammunition if you get into a drawn-out battle).
If you're dealing with a clued-in company, they'll hopefully have a reasonable social media team. Find their Twitter handle, Facebook page -- anything with their name on and a comments section, to be honest -- and post polite but damning comments. Hopefully, this will kick them into action. Social media people generally have powers that call centre drones don't, so getting their attention can be a good way to bring some top-level attention to your case.
Depending on who or what you're dealing with, there might be an independent watchdog or ombudsman. If the company is stonewalling you, take the details of your complaint (and those handy phone call records) to the third party, and file a complaint, which hopefully it'll investigate. I've personally had success with this move before, as the mere threat of a complaint often 'encourages' companies to settle before they're fully investigated. The Financial Ombudsman is a good place to start if you're dealing with the likes of PayPal or a bank; otherwise, Ofcom is good for disputes about telecoms (phone or internet providers); there's also a telecoms ombudsmen, Trading Standards, or this list of other ombudsmen. And, of course, you can always hire a lawyer, but by that point you have to start seriously wondering about getting a life.
As a last-ditch resort, emailing the CEO can prove fruitful. I recently managed to settle a 9-month dispute with Acer over a laptop by emailing the CEO, laying out my case, and spending a good few paragraphs lambasting the terrible customer service. You can find email addresses for hundreds of CEOs here. Other good people to email are anyone on the executive board, or the CEO of the external customer service team (if they've outsourced).
Ultimately, the key to getting what you want is knowing your rights, being a *slightly* pompous dick about things, and having hammerhead-shark levels of stubbornness. With all the effort involved, though, it might just be easier to buy a decent bit of hardware in the first place.