A phone can be locked in three different ways. Each one is removed differently, and only some of them can be removed by the person holding the phone.
A carrier-locked phone only works with SIM cards from the carrier that sold it. Only that carrier can unlock it, usually once the phone is paid off and has been active on its network for a set time. Ask the carrier for its unlock policy.
If you know the passcode, you can turn the screen lock off in the phone's settings. If you have forgotten it, the phone has to be erased and set up again, which deletes any data that is not backed up. Apple and Google publish the steps for their phones.
iPhones have Activation Lock, which is tied to the owner's Apple ID. Android phones have Factory Reset Protection, which is tied to the owner's Google account, and on Samsung phones also to the Samsung account. After a reset, the phone asks for that account's password. Only the owner can turn it off, by signing out of the account before the phone changes hands. Apple can also remove Activation Lock for the original owner with proof of purchase.
The Samsung Galaxy A53 page has a model-by-model checklist for that phone.
To list a phone for sale, see how to sell phones on FlexEmarket.