My friend has received a cheque for £35.30 but is very ill and unable to walk to a place where he can cash it. He has asked me to cash the cheque on his behalf but I don't know what the rules of this procedure is. Would I be able to do this for him? And what would I have to do in order to do this? What identification would I need? What do I do if there's any problems with completing this task for him?
It's possible to cash cheques by post. When I did this, it involved filling out a "paying-in slip" (I had a book of these provided by the bank) and posting the cheque together with the slip to an address provided by the bank. You could also bring the paying-in slip and the cheque to a branch and deposit them there, and it wasn't necessary that you were the account holder, just that the details on the slip matched the account you were paying into.
I Googled "paying-in slip" and found the instructions for HSBC as an example: Paying-In Slips. It explicitly mentions that you don't need to be the account holder to do this, and moreover there are even blank slips in the branch, which you just need to fill in with the correct account details. I think the procedure is much the same for other banks, but presumably you could check the relevant bank's website for specific guidance.
If the cheque is crossed (as almost all are these days), it can only be paid into an account in the name of the person it was written out to: it cannot be paid into another's account, nor can it be "cashed"1 – see the rules on "Crossed" cheques.
Note: that while the recipient of the cheque cannot (legally) alter this state of afairs, the writer of a cheque that was printed pre-crossed can – at least technically – cancel the crossing (see above link).
Probably the best the OP can do is pay in the cheque on the friend's behalf (as described in Ben Millwood's answer) and then either lend the friend some money until they are mobile and can get some cash to repay the OP (or have the friend write one of their own cheques which the OP can pay into their bank account).
1 As mentioned in the last section of the rules on crossed cheques, the only exception is that designated "Cheque cashing shops" have special arrangements to deposit cheques which they have cashed (after deducting a fee). However, they would (should?) require proof of identity (of the original payee) and so are unlikely to be of any help (and probably not worth the cost for £35). Having said that, I've never used one, so have no idea how strict they are in practice.
Anyone can walk into a bank, say "Hi, I'm a messenger, I have an endorsed check and a filled out deposit slip for Joe Blow who has an account here, please deposit this check for him, as he is incapacitated. Straight deposit." They'll fiddle on their computer, to see if they can identify the deposit account definitively, and if they can, and the check looks legit, "thanks for taking care of our customer sir." Of course, getting a balance or cashback is out of the question since you are not authenticated as the customer.
I have done the same with balance transfer paperwork, in that case the bank knew the customer and the balance transfer was his usual.
If the friend does not have an account there, then s/he should maybe open an account at an "online bank" that allows deposit by snapping photos on a phone, or phone up a branch, describe her/his situation and see if they have any options.
Alternately, s/he could get a PayPal account. Or get one of those "credit card swipe on your phone" deals like Square or PayPal Here, which have fees very close to nil, normally cards are swiped but you can hand-enter the numbers. Those are fairly easy to get even if you have troubles with creditworthiness. S/he would need to return the check to the payer and ask the payer to pay her/him one of those ways. The payer may not be able to, e.g. if they are a large corporation.
A last possibility is if the check is from a large corporation with whom s/he continues to do business with. For instance, the electric company cashiers out your account after you terminate service at your old location. But then you provision service at a new location and get a new bill, you can send their check right back to them and say "Please apply this to my new account".
If s/he is unable to get any of those because of more serious problems like being in the country illegally, then, lawful behavior has its privileges, sorry. There are lots of unbanked people, and they pay through the nose for banking services at those ghastly check-cashing places, at least in America. I don't have a good answer for how to get a check cashed in that situation.
If the cheque is not crossed, then your friend can write "payable to [your name]" above his signature when he endorses it. If it is crossed, you'll have to deposit it into his account. Given that one can deposit cheques at ATMs, this shouldn't require his presence. Just make sure he endorses it before you leave! It also might take a few more days to clear.