It depends on the phone; some models can be unlocked by tapping in a simple code on their keypad but others require the phone to be connected to a computer so that firmware/software can be altered.
However it is a useful warning that there are some unscrupulous individuals who charge money to tell you the methods available to unlock, rather than providing the instructions, in exchange for your money.
Incidentally, in the UK it is perfectly legal to get a phone unlocked. What is NOT legal is to get a blocked phone working again