sudo service apache2 stop
(I don’t have apache installed so the service name may be slightly different. Press the tab key twice after typing sudo service to get a list of possibilities.)
Apache will start on the next boot after this though in case you still need it.
If you don’t need apache then
sudo apt-get remove apache2
will remove it from your system.