ShareAlike is the element teachers most often describe as "viral", and the word causes needless worry. SA does spread, but only along a specific path. This lesson traces that path in four steps, with a short exercise at the end. It explains the licence as it is generally understood, not legal advice; the BY-SA 4.0 legal code on creativecommons.org is the text to read alongside.
SA has no effect while you use material privately or share it unchanged. If you print a BY-SA worksheet as it is and hand it out, you need only attribution. The obligation starts when two things happen together: you make an adapted version, and you share it. The 4.0 legal code calls the result "Adapted Material" and requires that the licence you apply to your contribution be the same licence, a later version of it, or a licence Creative Commons has approved as compatible.
So a teacher who heavily edits a BY-SA chapter for one class and never distributes the edited file outside that use is in a different position from one who posts it online. Most teachers do share, though, and handing copies to a class is itself sharing, so plan as if SA applies.
Adapted material is something derived from the original in a way that would need permission under copyright: translating, rewriting, abridging, rearranging content into a new work, or editing an image. The SA requirement covers the adapted work, including your new contribution within it. It does not cover:
This boundary is why the collection-versus-adaptation question matters so much in practice.
Creative Commons maintains a compatibility list for BY-SA 4.0. The Free Art License 1.3 is listed as compatible, and GPLv3 is listed as a one-way compatible licence, which matters mainly for software and some technical documents. Later versions also count: an adaptation of a BY-SA 3.0 work can be released under BY-SA 4.0. BY-NC-SA is not compatible with BY-SA, in either direction, because each requires its own terms for adaptations.
SA does not reach material you did not adapt, does not require you to share an adaptation you choose to keep private, and does not take away the rights of others whose work you combined. It also does not require you to publish source files, though doing so is good practice. What SA does forbid is adding restrictions: no extra terms, and no technical locks on your copy that prevent recipients exercising the licence.
For the practical steps, see adapting a BY-SA chapter; for the do's and don'ts list, combining ShareAlike content.