In the future please provide the exact model of the Mac with which you need assistance as we can provide a more direct and relevant answer.
If the system does not have Filevault enabled, then they can attempt to reset the admin account user password:
https://support.apple.com/en-us/HT202860
If you have a 2010 or newer Mac which has had macOS 10.12.6+ installed at some point, then you may have access to Internet Recovery Mode (Command + Option + R). Otherwise you can try using local Recovery Mode (Command + R).
You can also create a bootable macOS USB installer using another Mac.
If the Mac shipped with DVDs, then you can use an installer DVD. However, you will need to install at least OSX 10.6 Snow Leopard. If the original OSX DVDs are not OSX 10.6, then you will need a retail version of an OSX 10.6 Snow Leopard DVD instead.
You will need to erase the entire physical drive. If you boot into a macOS 10.13+ installer, then you will need to configure Disk Utility to reveal the hidden physical drive by using the information in this Apple article to reveal the physical drive:
https://support.apple.com/guide/disk-utility/erase-and-reformat-a-storage-device-dskutl14079/mac
If you boot to a macOS 10.6 to 10.10 installer, then you will need to partition & format the physical drive before installing macOS:
https://www.owcdigital.com/assets/support/support-formatting-and-migration/Mac_Formatting_6-10.pdf