Counting electrons and building the framework
A Lewis structure shows all valence electrons as dots and bonds as lines. To draw one, first count the total valence electrons (sum the group numbers for main-group atoms, add for negative charges, subtract for positive charges). Then place atoms and connect them with single bonds (2 electrons each), using up roughly 2(n-1) electrons for n atoms. Finally, distribute remaining electrons as lone pairs on atoms until every atom (except H, which needs 2) has an octet.
The process is iterative. If an atom lacks an octet after placing lone pairs, form a double or triple bond to a neighbor. Formal charge (valence electrons minus lone pairs minus half the bonding electrons) should be minimal and concentrated on atoms that can accommodate it, such as oxygen or nitrogen in anionic species.
Resonance and exceptions to the octet rule
Some molecules have multiple valid Lewis structures that differ only in electron placement. These resonance structures represent the same molecule; the true structure is a weighted average. Benzene, for instance, has two equivalent resonance forms with alternating double bonds, but the actual bonds are all equivalent and intermediate in character. Boron compounds and elements like phosphorus and sulfur can exceed an octet when bonding to more electronegative atoms, a phenomenon called hypervalency.
From Lewis to 3D shape and reactivity
Lewis structures tell you the connectivity and electron distribution but not the three-dimensional shape. VSEPR theory uses the Lewis structure to predict geometry: electron groups (bonds and lone pairs) around the central atom arrange to minimize repulsion. A Lewis structure that shows one double bond and two single bonds plus a lone pair predicts a bent shape, for instance. The structure also hints at reactivity; atoms with formal charge or unpaired electrons are reactive sites.