There are four general categories of explanation to the Torah based on the acronym of 'Pardes ' פרדס, פשט רמז דרוש סוד.
This is like is found by the Vilna Gaon in his commentary on Mishlei 1:21, the commentary of Ohr HaChaim on the Torah, Ki Thisa 32:6 beginning with the words, (כי לצד שהתורה יש בה ד׳ דרכים כלליים כו׳), Sefer Makor Chaim by Rabbi Shmuel Vital, drush 1 for Rosh Chodesh Sivan on Shir HaShirim 4:3, Sefer Eitz HaDa'at Tov of Rabbi Chaim Vital on parshat Netzavim with the words beginning (או ירמוז כי המצות כו׳), and Sha'ar HaGilgulim of Rabbi Yitzchok Luria, introduction 11 beginning with the words (דע כי האדם צריך שיקיים כל התרי״ג מצות)
But this division of the Torah into these four categories is not some modern innovation. It is presented in a similar format but with further details in Shemot Rabbah 20:2-5 (מלה"ד לאדם שהיה לו פרדס א"ל חברו מכור לי את הפרדס הזה מכר) and 33:1 (ויקחו לי תרומה, הה"ד (משלי ד) כי לקח טוב נתתי לכם תורתי אל תעזובו,)which compares the Torah to a garden with a well in the center from which flows a stream which divides into 4 branches and each branch waters a different part of the garden, raising 4 different categories of plants, olive trees, grape vines, pomegranates and spices. Shir HaShirim Rabbah 4:13:4 (ד"א שלחיך פרדס רמונים שלחיך עתיד הקב"ה לעשותך כפרדס רמונים לעתיד לבא,) explains how the source of the garden is the well and in 4:15 (מעין גנים באר מים חיים,) says that it is the source of the Halacha too. This theme is also repeated in Yalkut Shimoni on Pekudei 426 (והיו מימי הבאר יוצאין ונעשין נהרים נהרים.) and on Shir HaShirim 988 (מעין גנים, אמר ר' יוחנן מ"ח פעמים כתיב בתורה מים חיים כנגד מ"ח דברים שתורה נקנית בם,)in the name of Rabbi Shimon bar Yochai.(רבי שמעון בן יוחאי משל למה הדבר דומה לאחד שנפל לו פלטורית בירושה,)
'Peshat' is commonly translated as the 'plain meaning' or the 'simple meaning' of the text.
This is like the usage of the word as found in Ketubot 111b, which says, "פשטיה דקרא במאי כתיב".
But it also has a meaning of 'natural flow' like is found in Gittin 60b, which says, "נהרא כפשטיה ליזיל" and like Chullin 18b, which says, "נהרא נהרא ופשטיה".
It also has a meaning of 'deduction', meaning to derive a conclusion from facts and general principles as found in Brachot 2b, which says, "פשטו לה מברייתא". As contrasted with homiletics (דרוש) which are aimed at an inspirational or moral theme.
It also carries a meaning of 'skinning' or 'flaying', meaning to remove the surface and reveal what is underneath the surface, like is found in Mishnah Pesachin 5:9, which says, "כיצד תולין ומפשיטין".
The commentary of Rashi on the Chumash is said to be commentary according to 'Peshat', like he says himself on Bereshit 3:8, which says, "I didn't come except for the 'Peshat' of the written text and for Aggada that settles the text of the written Torah, 'a word spoken according to its way'."
This comment about what purpose Aggada serves in his commentary is taken from Mishlei 25:11. On that Mishlei, Rashi emphasizes that it is relating to how the dikduk is used. That suggests that Rashi uses Aggada to understand proper grammar in order to arrive at the Peshat.
ואני לא באתי אלא לפשוטו של מקרא ולאגדה המיישבת דברי המקרא, דבר דבר על-אופניו
And he reiterates this again on Bereshit 3:24, "There is Midrash Aggada and I don't come except for the 'Peshat'.
מדרש אגדה יש ואני איני בא אלא לפשוטו
This, in fact, is what is presented by Professor Yeshayahu Maori in his analysis of Rashi in the context of determining what makes up Peshat. See the following link for a detailed analysis.
Professor Maori concludes that,
There are three basic criteria according to which we can establish what is peshat and what is derash: (1) whether the explanation (and what follows it) is logically coherent; (2) whether it fits the context; and (3) whether it is compatible with the grammar of the language
Is it as Professor Maori presents? Or is there more to what constitutes Peshat? What are the specific elements which comprise and make up the 'Peshat', the 'plain meaning' style of commentary? If possible, cite specific examples for each element.