Diesel Exhaust Fluid (DEF) is a mixture of urea and water that is used in the Selective Catalytic Reduction (SCR) process on newer medium and heavy duty diesel vehicles.
Briefly, the DEF is sprayed into the exhaust stream and on to a special catalyst (In a different catalytic converter) where the urea reacts and turns to ammonia. The ammonia reacts with the various nitrogen oxides to break them down, lowering the tailpipe NOx levels to a point they pass EPA regs. I think the water component of DEF helps with particulates as well, although most of those are caught and burned off in the Diesel Particulate Filter, which is also in the exhaust, but separate from the SCR system.
DEF is kept in a separate tank on the truck, and never mixes with the diesel. As for what happens if you run it dry? Obviously the exhaust is dirtier, and I'd expect the truck to throw all kinds of codes, maybe even drop into limp mode. The whole SCR system is downstream and independent of the engine, so it shouldn't damage the engine, but I don't know enough about the catalysts involved to tell you if running the engine without DEF might damage the converters.