The Web server (Apache) does not get stuck while executing a request.
Apache has a default configuration that can serve multiple concurrent requests. It can do this by starting threads within each process and initiating new processes.
PHP, which is run by Apache, has many settings , and maybe you should explore each one to understand which ones can help you in your case. The "best" setting is difficult to know because each project has a different need.
However, like any program that runs on the server, depending on what it is doing, it can "hang" that process and a new request will be answered by another process. In Apache, because there may be multiple processes running, a time-consuming process will not prevent another from executing, but as the machine is one, depending on the type of operation you are doing, it will not be able to respond to requests in a timely manner. For example, if you have Apache and MySQL installed on the same machine and your PHP performs a complex query or does slow disk operations, the whole machine will be too loaded for Apache or any other process to run properly. >
Ideally, you should design your application not to run time-consuming processes within the Web server. In cases where time-consuming processes exist and can not be bypassed, your PHP script should pass to another application within the server that long task and the Web server would be released. That way, on the client side, you would have some page where you could monitor the progress of this long process, freeing the Web server to do the service of it, which is to meet the requests of other customers. The other way is to improve the configuration of the server machine or try to optimize your script / SQL queries that it executes to return the requests faster.
At the end there is no best-fit answer possible. It all depends on you understanding the settings and adjusting for your case. It's also worth investigating the reason for the time-consuming process.