Shabbos, Chapter 1, Mishnah 3. Our Mishnah lists a series of safeguards that the Sages instituted to distance a person from transgression, beginning with safeguards designed to prevent desecration of Shabbos.
"Lo yeitzei ha'chayat b'machato samuch la'cheishechah":
A tailor may not go out with his needle close to the time Shabbos begins, because he is liable to forget and still be carrying it once Shabbos has arrived. The Gemara explains that this applies even when the needle is stuck into his garment, and even in that manner going out would be considered carrying on Shabbos. The reason: this is the ordinary way a tailor carries his needle - not only in his hand, but also stuck into his clothing. Since this is the normal manner of transporting it, there is a genuine Shabbos violation here, and therefore he was forbidden to go out with it already on Erev Shabbos.
"V'lo ha'lavlar b'kulmoso":
The same applies to a scribe, who may not go out with his quill on Erev Shabbos, lest he come to go out with it on Shabbos itself. The Gemara notes that this too was said even when he places the quill behind his ear, the way a person places a pencil behind his ear. This was the ordinary way a scribe transported his quill, and therefore it constitutes desecration of Shabbos, and for that reason it was forbidden to him already on Erev Shabbos, lest he go out that way on Shabbos.
"V'lo yefaleh es keilav v'lo yikra l'or ha'ner":
The Mishnah adds two things that may not be done by the light of a lamp:
Delousing clothing: In those days, when lice were extremely common, people would regularly search through their garments and remove them.
Reading: This too was forbidden by the light of a lamp.
The reason for the prohibition: we are actually dealing with an oil lamp rather than a candle, and the concern is that a person will tilt the wick and adjust it so that it draws the oil better, in order to see well by its light. When a person is engaged in this sort of exacting activity - whether searching through clothing or reading - he is liable to come to tilt the wick in order to see better, thereby causing the burning wick to burn more brightly, which is of course a violation of Shabbos.
"Be'emes amru: ha'chazan ro'eh heichan ha'tinokos korin":
The Mishnah continues with the subject of reading by lamplight and establishes that this is the halachah. A 'chazan' in this context is the teacher responsible for the children: he is permitted to glance briefly and see where the young children are to read from, "aval hu lo yikra" - actually reading himself is not permitted to him. The children themselves may read, since there is no concern that they will play with the lamp, out of their fear of the teacher who is there with them.
"Kayotzei bo: lo yochal ha'zav im ha'zavah mipnei hergel aveirah":
The similarity to the preceding laws is that this enactment too was instituted as a safeguard, to distance a person from transgression. A zav - a man who experienced a discharge that renders him tamei - may not eat together with a zavah, a woman who experienced a discharge that renders her temei'ah, because of habituation to transgression, lest they come through this to sin. The reference is to a husband and wife: when she is a zavah - which is simply another form of niddah - they may not eat together in their usual manner, lest they come to draw close and be intimate with one another.
It is worth being precise: his being a zav is not at all relevant to the question of transgression, since there is no sin in a zav being intimate with his wife. The law depends essentially on her being a zavah, and the mention of his condition comes to teach us a novel point: even though a zav is generally in a state of illness and does not feel well - a state in which one might have argued that they will not come to intimacy as a result - nevertheless the safeguard remains in place, and they are not permitted to eat together in their usual manner.
In summary: In this Mishnah we learned four safeguards: the tailor and the scribe who may not go out with a needle or a quill close to nightfall, lest they come to carry them on Shabbos; the prohibition against searching through clothing and reading by lamplight, lest one tilt the wick; the teacher's permission merely to look at where the children are reading but not to read himself; and the safeguard of "lo yochal ha'zav im ha'zavah" because of habituation to transgression - a safeguard that stands firm even when it appears that there is no room for concern.