It is because of the tilt of the earth. It is facing the sun but the fact that it is tilted means that not all of the parts of the earth will experience the same types of light that the sun can provide. The earth also moves around its own axis. It can also revolve around the sun.
This makes the earth become tilted toward the sun during the summer time and it is tilted away from the sun during the winter time. Remember once again that not all parts of the earth experience the same thing. It is very likely that those who are exposed to the sun will feel the heat while those that are tilted away will feel colder.
The earth revolves around the sun but it is tilted. The angle of the tilt does not change just the position of the planet.
The summer is when that part of the globe is tilted towards the sun. If the northern hemisphere is tilted toward the sun the southern hemisphere would be tilted away.
The part tilted towards the sun gets more sunlight and is warmer. The part tilted away wouldnt get as much light and would be colder.