How can I tell the address of the remote server an app communicates to? I have installed an iPhone app from the AppStore that takes a phone number and searches an online database then returns a name that belongs to the entered phone number (and vice versa).

Is there a way for me to know what is the back-end server this app is talking to? (a hostname, or an IP address)?
This only applies to macOS and not to iOS:

You could use Wireshark or lsof which is already included in macOS.

With lsof you can type lsof -i | grep -E "(LISTEN|ESTABLISHED)" into your terminal and it will show you all connections that are actively communicating.

Edit: You could use a custom DNS like pihole to see which domains are requested by the app.