its stuck into the exhaust from the side.. number 16 on this picture http://bmwfans.info/original/E36/Cou...8/ill-18_0213/
Very rough explanation of its function:
it measures amounts of some chemicals in the exhaust fuels and sends this info to the engine's control unit. When the info is wrong, the unit can send wrong amounts of gas and air into the valves causing weird behavior, i.e. rough idle..
The best way to check the lambda probe is to go to the dealer for diagnostics - lambda probe errors will show up on their computer. In my case the lambda sensor reported wrong values only when the engine ran over about 4000rpm so when I returned after a long trip on a highway (lots of errors), the idle was all messed up, but running around the city (not many errors) it was just fine.