1) THE MOON IS HERE, THE MOON IS THERE
OPINIONS: The Gemara answers two apparently contradictory Beraisos by saying that sometimes the moon can be seen to the north and sometimes it can be seen to the south. In the wintertime the moon can be seen to the north, and in the summertime it can be seen to the south. What does this mean?
(a) RASHI explains that the sun sets at a different point on the western horizon each day, depending on the season. It sets farther south on the western horizon in the winter, and farther north on the western horizon in the summer. However, at the time of the new moon, the moon always appears at the "south-west corner." (Rashi implies that it appears there slightly before the moment at which the sun sets.) Therefore, on the shortest day of winter (the winter solstice) -- when the sun sets farthest south along the western horizon -- the moon is seen slightly to the north of the sun (that is, ahead of the sun in its circuit around the earth; see Rashi on the Mishnah with regard to "north" and "south" of the sun), since the moon reaches the south-westerly point at which the sun will set slightly before the sun does (i.e., before sunset). Similarly, when the sun sets in the northern side of the western horizon (in the summer) the moon still appears close to the southern corner, and thus it is seen farther south than the sun ("behind" the sun).
How is this possible? The moon always follows approximately the same path in the sky (as seen from earth) as the sun and the stars, and therefore the new moon -- which is right behind the sun -- always sets in approximately the same place in which the sun sets! When the sun sets to the north-west, so does the moon. Why does Rashi write that the place where the moon sets does not change depending on the season? Just as the place of the sunset changes, the place of the moonset also changes. Moreover, how can the new moon ever be seen "ahead" of the sun? By definition, the Molad is the point at which the moon passes the sun from west to east, and after the Molad it must be more to the east of (or "behind") the sun. (See TOSFOS to 20b, DH Chatzos, who asks a similar question on Rashi.)
(b) RABEINU CHANANEL offers a different approach to the Sugya which can be better understood based on the following introductory remark.
As Rashi explains, the point at which the sun sets changes throughout the seasons. The path in which the sun (as well as the moon and planets) is seen to travel around the earth is called the ecliptic. It is along this path that the sun is seen to be circling the earth once a day (and in which eclipses occur; hence the name "ecliptic"), and it is along this path that the twelve constellations (referred to as the "Mazalos," the zodiacal constellations) lie. Every month, a different one of the twelve Mazalos serves as the backdrop for the sun, since the sun slowly "slides back" along its path almost one degree per day. (That is, from the perspective of any given point on earth, the sun, along with the stars and planets, draw one full circle around the earth each day. This is due to the 24-hour rotation of the earth. Relative to the stars of the zodiac, the sun slides back almost one degree every day. This is due to the 365-day revolution of the earth around the sun.) In this manner the sun travels through the entire zodiac, a full 360 degrees, through the course of the solar year (365 days). Accordingly, it is evident that the point one degree behind the sun on the ecliptic will meet the horizon today in the same place where the sun will meet the horizon tomorrow.
The new moon is first seen when it is 9 to 15 degrees "behind" (eastward of) the sun (Rambam, Hilchos Kidush ha'Chodesh 17:3; see Insights to Rosh Hashanah 20:3:c:2 for how the words of Rashi (who says that the moon can be seen just six hours -- or 3 degrees -- after the Molad) are reconciled with this fact). The moon travels on approximately the same path as the sun (the ecliptic). Hence, when it is 9 to 15 degrees behind the sun, it will set at the point on the horizon where the sun will set in another 9 to 15 days. Therefore, from Tekufas Teves to Tekufas Tamuz (from the winter solstice to the summer solstice) the moon sets continually further north than the sun, since the sun sets progressively further north each day. The opposite occurs in the opposite season: from Tekufas Tamuz to Tekufas Teves (from the summer solstice to the winter solstice) the moon sets further south than the sun.
This is what the Gemara means when it says that in the summertime the moon sets to the south of the sun, and in the wintertime the moon sets to the north of the sun.
(According to this explanation, the Gemara's statement is true for every day except for the last four days before the solstice. After the day of the solstice, the sun no longer sets progressively closer to that corner of the western horizon, but rather it sets progressively farther from the corner. Accordingly, five days after the solstice the sun sets farther from the corner than it did four days before the solstice. Similarly, four days before the solstice the moon sets farther from the corner than the sun sets on that date, since the moon always sets in the place where the sun will set approximately nine days later.)
This is a novel interpretation of the word "summertime" ("Yemos ha'Chamah"), a term which normally refers to the period from Tekufas Nisan to Tekufas Tishrei (the beginning of summer until the beginning of winter, i.e., from the spring equinox to the autumn equinox), and not from Tekufas Tamuz to Tekufas Teves (from the middle of summer until the middle of winter, i.e., from the summer solstice to the winter solstice). However, Rabeinu Chananel cites the Yerushalmi which supports this interpretation and clearly states that the moon is to the north of the sun between Tekufas Teves and Tekufas Tamuz.
Some suggest that this is also what Rashi means when he describes the sun as moving from the north to the south. Rashi writes that the moon is always in the south-west when it is new. He means that it is in the western part of the sky (about to set), and it is always south of the sun before it sets (i.e., behind the sun, because the sun and moon always set over the western horizon while traveling at an angle from south to north [in the northern hemisphere], and the new moon by definition must follow behind the sun; see also Insights to 20:3:b:2).
Why does Rashi write that during "most" of the summer months the new moon sets to the south? The moon sets to the south of the sun during all of the summer months!
The first answer is that at the end of the "summer" season, within about four days of the winter solstice the moon sets where the sun will set five days after the solstice, which is towards the other direction (north, and not south, of where the sun presently sets), as explained above.
The second answer is that the moon has another movement which is independent of the sun. The moon does not follow the exact path as the sun (the ecliptic). Rather, the path of the moon is inclined at about 5 degrees to the path of the ecliptic. Whether the moon travels to the north of (above) or south of (below) the ecliptic varies over an 18-year cycle known as the "Saros cycle." (The Rambam discusses this at length in Hilchos Kidush ha'Chodesh, chapter 16.) Hence, on rare occasions the moon's 5-degree incline south of the ecliptic at the time of the new moon will offset its 9- to 15-degree distance from the sun which causes it to set north of the point of sunset from Teves to Tamuz. Because of its southern inclination, it may set slightly to the south of the point of sunset and not to the north (and vice versa from Tamuz to Teves).
(This is not a completely satisfactory answer for Rashi, however, for a number of reasons. First, Rashi apparently understands that "Yemos ha'Chamah" refers to the period from Tekufas Nisan to Tekufas Tishrei, and "Yemos ha'Geshamim" refers to the period from Tekufas Tishrei to Tekufas Nisan, unlike Rabeinu Chananel. Second, according to this explanation, the Beraisa's phrase "south of the sun" has an entirely different meaning from the identical phrase in the Mishnah, as Rashi their explains it. Rabeinu Chananel, in contrast, seems to understand the Mishnah's phrase in a manner consistent with his explanation of the Beraisa. See also Rambam in Perush ha'Mishnayos and Bartenura.)
(c) The PERUSH HA'RAMBAM on Maseches Rosh Hashanah explains the Gemara in a simple manner. As Rashi explains, the sun sets exactly at the midpoint of the western horizon at Tekufas Tishrei (the autumn equinox) and it sets south of the midpoint of the horizon from Tekufas Tishrei until Tekufas Nisan (the spring equinox), when it returns to the midpoint. From Tekufas Nisan until Tekufas Tishrei, it sets to the north of the midpoint of the western horizon. When the sun sets in the northern part of the horizon, the new moon -- which is only a few degrees behind the sun -- also sets in the northern part of the horizon. When the Beraisa says that it sets to the north in the wintertime, it means that both the sun and the moon set in the northern part of the horizon from Tekufas Nisan to Tekufas Tishrei (not like the Yerushalmi). The Beraisa is discussing both the sun and the moon, and it is referring to the north or south of the western horizon and not to the moon's position relative to the sun.