CREATE USER is an alias for CREATE ROLE. The only difference is that when the CREATE USER command is used , LOGIN is assumed by default, whereas NOLOGIN is assumed when the CREATE ROLE command is used. Below are the steps for creating new user/role in postgres with password.
if you get error "psql: error: could not connect to server: FATAL: Peer authentication failed for user "test_user"
than follow below steps.
1. navigate to "pg_hba.conf".
2. edit pg_hba.conf with entires show in updated entries below(path may be different according to pgsql version)