Assuming that model can be unlocked you'd usually enable developer options in Android settings, toggle the bootloader unlock option there then reboot to the bootloader and finish unlocking (and wiping) the phone.
There's some Samsung fuckery requiring button presses and/or a cable plugged into the phone at the right time during boot to get into different bootloader modes, the exact buttons and cable plugging sequence vary by model so Google and see if you can find an XDA thread or something.