PostgreSQL comes in a variety of distributions. In many of these, you will note that remote access is initially disabled as a security measure.

PostgreSQL 10 Administration Cookbook

PostgreSQL comes in a variety of distributions. In many of these, you will note that remote access is initially disabled as a security measure.
By default, PostgreSQL gives access to clients who connect using Unix sockets, provided that the database user is the same as the system's username. Here, we'll show you how to enable other connections.
The steps are as follows:
listen_addresses = '*'
# TYPE DATABASE USER CIDR-ADDRESS METHOD
host all all 0.0.0.0/0 md5
The listen_addresses parameter specifies which IP addresses to listen to. This allows you to flexibly enable and disable listening on interfaces of multiple network cards (NICs) or virtual networks on the same system. In most cases, we want to accept connections on all NICs, so we use *, meaning all IP addresses.
The pg_hba.conf file contains a set of host-based authentication rules. Each rule is considered in sequence, until one rule fires or the attempt is specifically rejected with a reject method.
The preceding rule means that a remote connection that specifies any user or database on any IP address will be asked to authenticate using an MD5-encrypted password. Precisely, the following:
Don't use the password setting, as this sends the password in plain text. This is not a real security issue if your connection is encrypted with SSL, and there are normally no downsides with MD5 anyway, and you have extra security for non-SSL connections.
In earlier versions of PostgreSQL, access through the network was enabled by adding the -i command line switch when you started the server. This is still a valid option, but now it means the following:
listen_addresses = '*'
So, if you're reading some notes about how to set things up and this is mentioned, be warned that those notes are probably long out of date. They are not necessarily wrong, but it's worth looking further to see whether anything else has changed.
Look at installer and/or operating system-specific documentation to find the standard location of the files.