I have installed Lamp. Now I would like to remove it and replace it with Xampp. I'm a bit worried about Apache and MySql. Lamp is located in the var folder, Xampp in the opt folder. What's the correct procedure to do that?
LAMP stands for Linux Apache MySql (MariaDB) PHP (Perl, Python) while XAMPP stands for Cross-Platform (X) Apache MariaDB Php Perl. If you're using Ubuntu you can easily uninstall MySQL, PHP, and Apache using apt.
sudo apt-get remove php5 mysql-client mysql-server apache2
The XAMPP people have a binary you can install from.
UNRELATED: It's fair to say that it's redundant to use XAMPP as you can achieve the same thing by simply using the packages that are in apt. Simply install Apache, Perl, PHP, and MariaDB and that's XAMPP (You're on "askubuntu" so I'm assuming that you're on Ubuntu. XAMPP is more logical to use if you're using Windows or Mac OS X.
sudo apt-get install php5 perl mariadb-server mariadb-client apache2 # The same thing as XAMPP
As far as graphical interfaces for managing Apache refer to this question.