What relationship between php-cgi and php-fpm?
PHP-CGI is a CGI interface. PHP-FPM is a FastCGI interface.
CGI gets run once per request. FastCGI gets run once, at server startup, then enters a request loop. This makes CGI simpler, as it has no dependencies; FastCGI is faster, since it avoids any start-up times, but it's a bit more complex to set up.