According to Shulchan Aruch, (please cite Saeef and Siman so I can read further):
When do we switch from Morid Hatal to Morid Hageshem and vice versa? What about Barechenu and Barech Alenu?
What happens if we say the wrong beracha?
The Shulchan Aruch (Orach Chayim 114:1) states that "We begin saying (in the second beracha) Mashiv HaRuach U'Morid HaGeshem during the Mussaf prayer of the final Yom Tov [of Sukkot (i.e. Shemini Atzeret)] and do not cease until the Mussaf prayer of the first day of Pesach":
Here, too, is the Mishnah Berurah digest for se'ifim 1 and 2. The siman goes further and describes what to do in different situations (e.g. if you have made a mistake but have not yet finished the beracha, if you have made a mistake and have already finished the beracha, etc.).