i want to know what is apache server?how it relates to php
Apache is a web server for the linux operating system that you can use to serve websites. PHP is just one of many server side scripting languages for the web. If you want to run a php script, you most likely will be doing so via the Apache web server. PHP is also often used with the MySQL database. This forms the common acronym LAMP to define this group of technologies: Linux Apache MySQL PHP.
We have a forum dedicated to Apache here: http://www.daniweb.com/techtalkforums/forum33.html
I'd like to add that Apache is also very stable on Windows and many websites use Apache and PHP on Windows to serve their websites. However, Apache and PHP are native on Linux. If you are starting your webmaster journey, I recommend you stick to the LAMP architecture that csgal explained so well.
PS: This stuff is not going to be easy at first! Prepare to struggle for awhile. :) There is nothing really intuitive about configuring a web server or learning scripting languages. There are a lot of pieces you need to learn and integrate to create a full solution. But eventually, you become the guru.