Taken from the cheats section on GameFAQs.com :
"In order to enable your console, (cheat box, basically) right click on the half life shortcut. Go down to properties. A box should open up with the properties. Go to the target tab. The line should look something like this: X:SierraHalf-Lifehl.exe . At the end of that put -console . Now it should look like X:\Sierra\Half-Life\hl.exe -console . Make sure that you are only using one space. Now, go back into Half Life. The main startup screen should have an extra selection that says console. Here you can enter cheats, see what's loading, and even kick people if you are on a server. "
After you've altered the file name and start the game you can press � key (or it could be tab key) to bring up the console and cheat.