Nginx [engine x] is an HTTP and an IMAP/POP3 server.
What advantages does Nginx have over Apache?
Nginx and Apache are different servers for different purposes. It is not right to compare them. Nginx is designed for working with static pages. It can be used in the front end. Apache can be used in the backend for generating dynamic content.
Servers with modern control panels use both Nginx and Apache. They use Nginx in the front end for rendering static content and Apache or PHP-FPM in the back end for generating pages in PHP. This bundling allows you to create a flexible and performant system.
Also, Nginx can be used as a proxy for requests to Apache, NodeJS, and Ruby.