How is Sufism different from Sunni and Shiite Islam?

Sufism is all about mysticism, whereas Sunni & Shia are all about doctrine. Sunni & Shia are divided into further sects, whereas Shia is divided into orders.
Sufism is mysticism whereas Sunni and Shiite are orthopractical orthodoxies. It is hard to exactly explain what this means, but probably the best way to imagine it would be that Sufism is like poetry whereas Sunni or Shiite are like instruction manuals. Sufism doesn't have exact rules, is more about emotion than procedure, makes every syllable and motion count, etc. Sunni and Shiite are about form, regimentation, rules, study, and devotion. They are both roads to God through Islam.