You were taught that Earth and other planets in our solar system orbit the Sun, and that our solar system orbits the center of the Milky Way. Did your science teacher have it wrong? Is everything you've learned about physics and gravity wrong?
For all practical purposes, what you were taught wasn't entirely wrong. Although the Earth does generally orbit the Sun, in the strictest sense, it doesn't. The Sun and all other planets each have their own gravitational force which interacts with and pulls on one another. The result of this phenomenon is that everything in an orbital system — like our solar system — orbits the center of mass of the system. This 'center of mass' of the solar system is called the solar system barycenter. The Earth, the Sun, and everything else in our solar system orbit this barycenter — not the Sun.