If you’re referring to a carrier lock, ask the carrier it’s locked to.
If you’re referring to the activation lock and the Apple ID involved isn’t yours, you need to ask the account holder to remove it, or the iPhone’s original owner needs to take it and its purchase receipt to a physical Apple Store.
(158629)