A solar eclipse occurs when the sun, moon and earth are lined up, in that order, and also along the same plane in space. That is, you can draw a direct line between the three objects. The sun, shining on the earth during the day, casts a shadow because of the moon in the way.
NASA graphic simulation video of eclipse from space:https://youtu.be/JBE16gbuFCk
YOU MUST HAVE SPECIAL GLASSES TO VIEW A SOLAR ECLIPSE WITHOUT DAMAGING YOUR EYES!
While totality may be safely viewed with the naked eye, before and after you can damage your eyesight. St. Clair Chamber has special Eclipses Glasses and Viewers for sale for a modest price.