It is never safe to look directly at the sun's rays — even if the sun is partly obscured.
When watching a partial eclipse, you must wear eclipse glasses at all times if you want to face the sun, or use an alternate indirect method. This also applies during a total eclipse up until the time when the sun is completely and totally blocked.
During the short time when the moon completely obscures the sun — known as the period of totality — it is safe to look directly at the sun, but it's crucial that you know when to take off and put back on your glasses.
First and foremost: Check for local information on timing of when the total eclipse will begin and end. NASA's page of eclipse times is a good place to start.
Second: The sun also provides important clues for when totality is about to start and end.
1. As the moon moves in front of the sun, there comes a time when several bright points of light shine around the moon's edges. Known as Baily's Beads, these are light rays from the sun streaming through the valleys along the moon's horizon.
2. As the moon continues to move, the extent of these beads diminishes, until there is only one — a bright spot that, in combination with the atmosphere of the sun still visible around the moon, looks like a giant diamond ring.
It is still not safe to look at the sun at this point! Only when that bright spot completely disappears can you safely look at the sun.
3. Once the bright "diamond" disappears and there is no longer any direct sunlight coming toward you, you may look at the total eclipse safely.
But you must still be vigilant to make sure you protect your eyes again before the end of totality. The entire total eclipse may take only a minute or two in some locations.
4. As the moon continues to move across the face of the sun, a crescent will begin to grow larger on the opposite side from where the Baily's Beads shone at the beginning. This crescent is the lower atmosphere of the sun, beginning to peek out from behind the moon and it is your signal to stop looking directly at the eclipse.
Make sure you have safety glasses back on — or are otherwise watching the eclipse through a safe, indirect method — before the first flash of sunlight appears around the edges of the moon.
5. Once your eyes are protected again, you may continue to watch the final stages of the eclipse as the end process mirrors the beginning: You will once again see a diamond ring and then the Baily's Beads, before the entire sun is once again visible.
Eclipse viewing information supplied by NASA.