The hide special command orders a unit to attempt to evade enemy spotting. A hide order to a unit with move orders automatically gets added to its last waypoint; no unit can hide until it is stationary.
A unit trying to hide cannot fire any of its weapons, nor can it move or perform most other commands. Hiding is compatible with deploying, however. Infantry will go prone in their action spot, moving into concealment if possible. Any movement within their action spot will be low crawling only. Note that going prone is highly effective against spotting in certain kinds of terrain. For example, going prone behind a hedgerow breaks line of sight to all units on the other side unless one is within about 10m; and since spotting requires line of sight, hiding always works against such units.
Whether a unit is successful in hiding depends on enemy spotting. The unit which hides does as much as possible to prevent being seen, but if an enemy is close enough, or the unit's concealment is lacking, the enemy may still spot it.
The "unhide" order is the converse of hiding: the unit immediately stops attempting to hide. Infantry rise up to the normal kneeling fighting stance. For the most part, you don't need to explicitly order units to unhide -- you need merely give any other order which precludes hiding, and the unhide is implicit.
According to the CMBN Game Manual, "units might decide to stop hiding if fired upon or if the enemy approaches extremely close, depending on that unit’s experience, morale and leadership."