The human eye is extremely sensitive to the sun's light. Even a glance at the sun will cause after-images, as a result of overexposure to strong light. Looking at the sun directly, even for a few seconds, can cause permanent burns to the retina at the back of the eye. For this reason, a solar eclipse should never be viewed with the naked eye.
The safest way to observe a solar eclipse is with a pinhole projector. The sun's light enters the projector through a pinhole at one end of a long box and is projected onto a sheet of white paper at the other end. The longer the box, the larger the image. The image will be inverted, because the light rays cross as they enter the pinhole.
Most welder's goggles will not block the sun's rays sufficiently to protect your eyes during a solar eclipse. Only welder's goggles that are rated at 14 or higher can block enough light to keep your retinas from becoming damaged.
When a total eclipse is due, some suppliers market special eclipse goggles with No. 14 welder's glass for their lenses. You can also buy basic squares of No. 14 welder's glass much more cheaply, but you will have to hold it up to your eyes manually each time you look at the eclipse. With the goggles, you won't have to remember to look through them each time, because it will be automatic.
Do not use a telescope or binoculars
Telescopes and binoculars work by concentrating the light from a distant object and focusing it into your eyes. It is even more dangerous to view the sun through these instruments than it is to view the sun with the naked eye.
A total eclipse can be viewed safely with the naked eye during totality because the only light comes from the Sun's corona. However, a total eclipse only lasts for a few minutes. As soon as the sun reveals Bailey's beads or the diamond ring behind the Moon, naked eye viewing is no longer safe.
For the same reason, an annular eclipse should never be viewed with the naked eye. Even at totality, the sun's light is never restricted to the corona.
Lunar eclipses may always be observed safely with the naked eye. They involve the sun's or Earth's reflected light, not the sun's direct light. Thus, they are no different than looking at the moon directly at other times.