Lye is used to make soap and potash, though potash can also be made directly from ash. Lye is moved from buckets into a barrel if you have a food stockpile with "misc. liquid" enabled, and a spare barrel. A barrel can hold 50 units of lye. However, a bucket of lye can also be used directly to make soap. Lye freezes in cold weather. You'll have to wait until it thaws in order to make soap. Magma helps unfreeze lye.
Soapmaking jobs use stacks of lye and not individual units of lye. This doesn't affect lye you produce yourself, but the lye (10) you buy from traders is only good for one bar of soap. On embark, individual units of lye are combined into stacks of five as necessary. One bar's worth of lye will cost you two points, but enough lye for another bar will cost ten points because you need another five units of lye to start a second stack.
Lye is located under Food -> Misc. Liquids in the Stocks screen.
[MATERIAL:LYE] - reconstructed from data extracted from memory [STATE_COLOR:ALL:CLEAR] [STATE_NAME_ADJ:ALL_SOLID:frozen lye] [STATE_NAME_ADJ:LIQUID:lye] [STATE_NAME_ADJ:GAS:boiling lye] [STATE_NAME_ADJ:SOLID_POWDER:frozen lye powder] [STATE_NAME_ADJ:SOLID_PASTE:lye slush] [BUILD_COLOR:7:0:0] [TILE_COLOR:7:7:1] [MATERIAL_VALUE:2] [SPEC_HEAT:4181] [MELTING_POINT:10000] [BOILING_POINT:10180] [SOLID_DENSITY:920] [LIQUID_DENSITY:1000]