Fermentation locks use a barrier of water, sanitizer or cheap spirit to allow CO2 to escape from your fermenter while preventing other stuff from getting in. S-Type airlocks are great for lagering. They prevent suck-back which can happen due to the pressure differential when cooling your fermenter to a lower temerature.