Slightly rude question, but is the mobile nicked, or has it ever been reported as stolen (ie.did your mate lose it then find it again or something?) When you say ‘off a mate’, is it someone you know well and trust, or someone off ebay or something?
Just that this is exactly what a phone that is blocked by a network due to being reported stolen looks like – sim card registration failed with any network sims.
One quick thing worth checking is in the menus somewhere to find ‘operator selection’ or ‘network selection’, and make sure that is set to automatic not manual.
Assuming that isn’t the case, the first thing I’d do is try your mate’s sim card who you got the phone off just to check it actually works at all. If that works, then it is probably just a network lock, depending on the phone, you may be able to unlock it for free, or it is a local phone shop job. If that doesn’t work, it’s hard to know what it could be other than a network block or a broken phone.