According to Chazal, cited in our Parsha by Rashi (לבראשית ל"ב:ט' בד"ה והיה), Yaakov prepared himself for his encounter with Eisav in three ways, preparing a gift offering to appease Eisav, a strategy for war, and a prayer. In relationship to prayer, the Gemara in Berachos (כ"ו: דף) states that "תפלות אבות תקנום," the Avos, namely, Avraham, Yitzchak and Yaakov, established our Tefillos, our prayers; various Pesukim are cited there to associate a particular Tefillah with each of the Avos. Avraham is identified as the source for Tefillas Shacharis, the morning service, Yitzchak is given credit for establishing Tefillas Minchah, the afternoon service, and Yaakov is said to have instituted Tefillas Maariv, the evening service.
The Gemara (שם), however, actually records another opinion concerning the origin of our Tefillos. Another authority states that "תפלות כנגד תמידין תקנום," our Tefillos were instituted to be commemorative of the daily sacrifices in the Beis HaMikdash. In reality, though, it may be explained that the two authorities are not arguing with one another; they merely represent different aspects of Tefillah. The Avos are to be credited for establishing the institution of prayer. Theoretically, it might appear to be the height of "Chutzpah" to expect Hashem to be ready to respond to our Tefillos the moment we are engaged in prayer. After all, we can not even talk to our local congressman, our senators, or our president simply whenever we desire to; certainly, then, we have no right to expect Hashem to tune in to our Tefillos whenever we decide to daven Shacharis, Minchah or Maariv. Our justification for davening, therefore, is the fact that we emulate the example furnished by the Avos. Their Tefillos serve as a "מתיר," a form of Halachic permission, for us to daven, and consequently, we introduce each Shemoneh Esrei with a reference to the Avos, saying "אלקי אברהם אלקי יצחק ואלקי יעקב." This is the meaning of the assertion of the Gemara (שם) that the Tefillos were instituted by the Avos. The pattern, frequency and timing of each Tefillah, however, follows that of the daily Korbanos. Shacharis is thus patterned, for example, after the תמיד של שחר, the daily morning offering, while Minchah corresponds to the ,תמיד של בין הערבים, the daily afternoon offering. This is what the Gemara (שם) means by saying that the Tefillos were instituted to correspond to the Korbanos.
The question, however, is where exactly Tefillas Maariv, instituted by Yaakov Avinu, fits in to all this. The very status of Maariv, first of all, is somewhat unusual, because whereas Shacharis and Minchah are undoubtedly mandatory, the nature of the obligation to daven Maariv is subject to a dispute between Rabban Gamliel, who claims that it is a חובה, an obligation, and Rabbi Yehoshua, who believes that it is a רשות, an option. The Gemara later in Berachos (דף כ"ז:) cites this dispute and then says that Abayei followed Rabban Gamliel, and Rava followed Rabbi Yehoshua holding that Maariv is a רשות. In light of the aforementioned analysis regarding the Korbanos, we can understand why Maariv might be a רשות. Shacharis and Minchah, as noted above, correspond to mandatory Korbanos in the Beis HaMikdash, and there is thus a source upon which to base mandatory Tefillos. Every day, the תמיד sacrifices were offered in the morning and in the afternoon. Essentially, however, the Beis HaMikdash was closed at night. The Posuk later in the Torah (ויקרא ז':ל"ח) hints at this by linking Korbanos with the word ביום"," "during the day." If, however, there were limbs and fats which were scheduled to be burned on the Mizbeiach during the day and a backlog developed, it was permissible to then burn these items at night. At times, therefore, there was activity at night, although at other times, there was no activity at all at night. For this reason, the status of Tefillas Maariv, which corresponds to the burning of these items, which only sometimes took place, is different, and thus Maariv itself is considered a רשות, an optional Tefillah.
The Halacha, as recorded in the Gemara (שם), is in accordance with the decision of Rava that Maariv is a רשות. The Rambam (פרק א' מהל' תפילה הלכה ו',ובפרק ג' שם הלכה ו',ז') rules accordingly, adding (שם פרק ט' הלכה ט') that this is the reason why the Shemoneh Esrei is not repeated at Maariv. The Rif in Berachos (דף י"ט. בדפיו), however, adds that it is true that Maariv is optional only if one has never davened Maariv at all, but if one has davened Maariv, it is as if he has accepted it as an obligation, and it becomes mandatory. It is somewhat difficult to explain this idea. How does one create an obligation by simply engaging in an optional activity even one time? Perhaps it can be understood as a נדר לדבר מצוה, a vow to observe a Mitzvah, which becomes obligatory to fulfill, as implied in the Shulchan Aruch (יורה דעה סימן ר"ג סעיף ו',ז'). In any case, Maariv is treated today as a חובה, an obligation. For this reason, if one failed to recite משיב הרוח ומוריד הגשם"" during the winter months, the omission of which invalidates the Shemoneh Esrei (עיין שולחן ערוך אורח חיים סימן קי"ד סעיף ה'), even for Maariv one must repeat the entire Shemoneh Esrei. The same is true of forgetting to include יעלה ויבא on Chol HaMoed during Maariv (שם סימן ת"צ סעיף ב'); it would also have been true for omitting יעלה ויבא at Maariv on Rosh Chodesh if not for the rule that "אין מקדשין את החדש בלילה," meaning that Rosh Chodesh was never declared at night (שם סימן תכ"ב סעיף א'). Despite the fact that we treat Maariv as a חובה, an obligation, fundamentally, it is in essence still a תפילת רשות, an optional prayer. In effect, we are "obligated" to daven a תפילת רשות.
HaRav Yosef Dov Soloveitchik connected this idea to an unusual Halacha cited by the Rambam (תפילה הלכה ו' פרק י' מהל'), who states that if one is in doubt as to whether or not he davened, he is permitted to daven again provided that he has in mind that this additional Tefillah is a נדבה, a voluntary Tefillah. The Rambam then continues (שם) and says that if someone began to recite the Shemoneh Esrei and then remembers in the middle that he has already davened, he must stop immediately, even if he is in the middle of a Beracha. If, however, this came about during Maariv, he may continue and complete the Shemoneh Esrei. HaRav Soloveitchik explained that Shacharis and Minchah are essentially obligatory Tefillos. Therefore, if one begins a Shemoneh Esrei for either Shacharis or Minchah believing that he has not yet davened and is thus about to daven a תפילת חובה, when he finally realizes that he has indeed already davened, he can not complete that Shemoneh Esrei as a נדבה, for no Shemoneh Esrei can be half חובה and half נדבה. Hence, he must simply stop right where he is. However, when reciting Maariv, which essentially is a תפילת רשות and is thus analogous to a תפילת נדבה, if one realizes in the middle that he has already davened, he may complete that Shemoneh Esrei anyway, for even if he started davening Maariv to discharge his obligation, the essence of Maariv is fundamentally optional, a רשות, and hence this Shemoneh Esrei can be completed as a תפילת נדבה.
Another Halacha cited by the Rambam again confirms this idea. The Rambam (פרק ג' שם הלכה ז') writes that one is permitted to daven Maariv of Shabbos on Friday evening prior to sundown, and Maariv of Motzaei Shabbos prior to the expiration of Shabbos, for, after all, Maariv is a רשות, and it is thus not necessary to be meticulous with its time. Even if we assume that the Rambam agrees to the idea cited above from the Rif (שם), as he indicates earlier (פרק א' שם הלכה ו'), that today we have accepted davening Maariv as an obligation upon ourselves, nevertheless, the essence of Tefillas Maariv remains a רשות, and we are thus not as demanding with the time that it may be recited.
It must be pointed out that Tosafos in Berachos (דף כ"ו. בד"ה טעה), challenges the entire premise of the Rif (שם), and claims that the idea of תפילת ערבית רשות, that Maariv is an optional Tefillah, does not mean that one enjoys the option of whether to daven Maariv or not. Tefillas Maariv has always been and still is a חובה. The term רשות is used only to cover a situation where one is faced with a conflict because he can either daven Maariv or fulfill another Mitzvah. If a second Mitzvah presents itself at the same time when one is about to daven Maariv, he then may exercise the option of foregoing Maariv in order to observe the other Mitzvah. Ordinarily, without the designation or Tefillas Maariv as a רשות, the Halacha would have stated that in such a case, one should daven Maariv and, if necessary, forego the observance of the competing Mitzvah. Once Maariv is declared as a רשות, however, the conflict is resolved in favor of the other Mitzvah, and one must thus fulfill the other Mitzvah and omit Maariv. Of course, the practice today is to daven Maariv every night and to indeed treat it as a required part of our daily routine.