Some banks do allow you to deposit money into someone else's bank account and a few others don't allow it.
It's up to the individual bank on whether they'll allow another person to deposit money into someone's bank account.
If the bank does allow you to deposit money into someone else's bank account then you'll just need to show identification and fill out a deposit slip to deposit the money into the persons bank account.