http://doc.cat-v.org/plan_9/4th_edition/papers/sam/ reproduces the original paper by Rob Pike, which goes into some detail, and at length.
http://sam.cat-v.org/ collects links to sam implementations, papers, and paraphernalia (such as ssam, which I originally wrote with Russ Cox). To better learn sam in a workaday role, figure out why the sam idioms at
http://sam.cat-v.org/cheatsheet/ work (I have Acme versions of many of these at
https://raw.github.com/catenate/acme-fonts/master/test/1/acm...).