Lecithin is an emulsifier - that is, it provides 'slipperiness' between the fat in your chocolate, and the water - for as you know, the two don't mix well. Yes, there is water in your chocolate - a little bit comes with the sugar, the milk, and the cocoa components for example, or the relative humidity in the production area. Lecithin is an ampi-phillic molecule - ie one end 'likes' to stick to lipids (fats), and one end likes to stick to hydrophillic things (such as water).
Lecithin is a mixture of lots of things, but the 'active' element of lecithin can vary. The viscosity reducing capability of lecithin depends on many, many, many things, one of which is how much of the active component is present. Total moisture content, total fat content, particle size, particle distribution, conch time, etc all factor in as well.
To your main question, lecithin is thought to 'coat' the particles of sugar, with it's hydrophillic end touching the sugar, and it's lipophillic end pointing outwards towards the cocoa butter. This provides a 'bridge' between the two, allowing for them to slip past one another, instead of forming a sticky mess.