A solar eclipse happens when the moon blocks the sun from the earth, and a lunar eclipse when the earth blocks the sun from the moon. Because the apparent diameter (how big it looks) of the moon is about the same as the sun, the alignment of the earth, moon and sun have to be almost perfect for a solar eclipse to occur.