The Sun is a big bright ball of plasma engaged in thermonuclear fusion. The Earth is a small rock that would be cold and dark if the Sun didn't keep it heated and lit. The Earth orbits the Sun as one of eight planets in our Solar System.
Stars and Planets
The universe as we know it has two basic types of astronomical objects: stars and planets. Stars are objects with enough mass for thermonuclear fusion. Planets are, roughly, everything smaller than that. Comparing the Sun and Earth, both are astronomical objects, but the Sun is a star while the Earth is a planet. In some ways, the two are opposites of each other on a continuous size spectrum of astronomical objects.
The Sun and Other Stars
In the cores of active stars like our Sun, hydrogen fuses into helium, which produces heat and light. The chemical composition of the Sun is about three quarters hydrogen and one quarter helium, with other trace elements like carbon, oxygen, and iron. These elements exist in plasma phase - a phase like gas but ionized, which allows it to form structures in response to electromagnetic fields (if you've ever seen a plasma lamp, it's like the lightning you see when you touch the lamp). The energy from hydrogen fusion buoys the Sun up against its own gravity, giving it a size of about 100 times the Earth's diameter.
In short, the Sun is a ball of bright hot plasma. Unlike the Earth, its surface isn't permanently defined and its total size can change - the surface can rise or fall relative to the core. For example, once the Sun runs out of hydrogen, it will begin fusing helium to carbon and oxygen, and its surface will expand until its size is larger than Earth's current orbital path.
The Earth and Other Planets
Planets are astronomical objects that are too small for thermonuclear fusion, but large enough to have the gravity to make themselves round. There are two kinds of planets. Gas giants are large balls of mostly gas. Terrestrial planets are smaller rock or ice balls, mostly liquid and solid, that aren't massive enough to collect and hold enormous gas atmospheres. The Earth is the latter kind of planet.
Largest of the terrestrial planets in our Solar System, the Earth has a chemical composition of about a third iron - most of it in the core, a third oxygen - most of it in the crust, and the remaining third mostly silicon and magnesium. Every other element on Earth - including hydrogen and helium - is 3% or less of the total composition. The interior of the Earth generates some heat through radioactive decay, but most heat and all light comes from the Sun. All life on Earth is ultimately powered by energy from the Sun.
Both the Sun and Earth are part of the Solar System in the Milky Way Galaxy. The Sun is at the center with 99% of the system's total mass. Everything else, including the Earth, orbits around it. The Earth is the third planet from the Sun, after Mercury and Venus, orbiting at a distance of about 93 million miles. Light from the Sun takes approximately eight minutes to reach the Earth.
Within our Solar System, there are many astronomical objects large enough to be called planets, but which orbit other planets instead of the Sun directly. These are called satellites or moons instead of planets - for example Earth's moon (which we call Moon).
Reference and Image Credits
Kaufman, W.J. III. Universe 2nd ed. W.H. Freeman and Company, 1987.
X-ray image of the Sun by Japan's Yohkoh solar observatory spacecraft.
Earth image by NASA.
Relative size of Sun and planets from rense.com