Obviously it depends on your vehicle and the system it uses.
As an example, Toyota FJ70 has a electric solenoid, (which can fail or get jammed) and this uses air to pressure to engage the Transfer case electrical switch, and therefore put you in 4wd. Are you having problems selecting 4wd ? What vehicle ? Look at your transfer case, there should be either a solenoid looking thin on the outside with wires going to it, or a vacuum line that goes to a solenoid. You need to make sure power is going to this when selecting 4wd, and that it is having the desired effect to engage 4wd..
But first, always check fuses