The crowbar is your default melee weapon in Half-Life, and it works exactly how you'd expect: press the left mouse button to swing it.
Line up your crosshair on a crate, a barrel, a breakable panel or an enemy before you swing and you'll connect. It's the tool you'll use constantly in the opening sections, both for prying open supply boxes and for dealing with headcrab-sized problems when you're out of ammunition.