The LAMP stack is the Linux, Apache, MySQL and PHP (LAMP) software stack. It's common software stack for web development which comes with a operating system (Linux), and webserver (Apache), an database (MySQL) and a programming interpreter (PHP).
The operating system. This is the first layer. All other layers run on the top of this layer.
The web server. This is the second layer running on the operating system. Web servers are handling requests made by web browsers and responding the website content.
A open-source relational database management system. It stores content for websites, handling relations. The database data can be queried by using SQL.
The scripting layer consists of PHP (a web programming language). Web applications run on this layer.