The server-side execution is no different in an AJAX call vs. any other call. For some clarification, take a look at the Network tab in a browser debugging tool (such as FireBug or Chrome tools). Watch the requests made to the server when the page loads, as well as when AJAX requests are made. They all share the same structure.
An HTTP request is sent to the server, which consists mainly of headers and perhaps content, and the server responds with an HTTP response, which consists mainly of headers and content. Requests also have verbs (GET, POST, etc.) and responses also have codes (200, 404, 500, etc.). These details are all the same regardless of whether it's an AJAX request or not.
For example, if you were to make an AJAX request to a "normal" PHP page, you'd see in the browser debugging tool that the response contains all the HTML for that page. The server saw no difference, it just responded to the request.
It's up to the client (the web browser) to know what to do with the response. For a "normal" page load the browser renders the HTML page. For an AJAX request the JavaScript would need to handle the response.