How it happened, or how it works? 2 different questions.
Just like in Lost: Viewers clamored for answers to what the smoke monster was for virtually the entire run of the series (The "monster" was introduced in the pilot). We were treated with an answer in the 2nd to last episode of the series, and it ended up being some dude floated down a river and into a glowing cave, only to emerge as a smoke monster. LOLWHUT?
Completely bypassing how it works that a man can turn into a smoke monster, and just asking us to take for granted that he did indeed turn into a smoke monster.