Because the earth's axis of rotation is tilted, the sun's rising and setting locations appear to change throughout the year. There are only two times each year when the sun rises due east and sets due west. These times are the autumnal and vernal equinoxes in September and March, respectively. The rest of the year, the sun will be either north or south of due east and west.
The northern hemisphere is tilted away from the sun during the winter, and so the sun will rise in the southeast and set in the southwest, staying in the southern part of the sky throughout the day. During the summer, the northern hemisphere is tilted toward the sun, so the sun will rise in the northeast and set in the northwest.
It is important to remember that the earth is rotating on its axis, and the axis doesn't change directions. As the earth moves in its orbit around the sun, the axis simply ends up facing towards or away from the sun. Check out the link to the NASA site below for more information on this and the earth's seasons. This is a common misconception that makes it more difficult to understand the relationship between our earth and the sun.