For a graphical tool to access the database, use pgAdmin (also available for Mac, Windows and Linux) http://www.pgadmin.org/download/
The File menu has the option Add Server… where a connection to the database server can be made.
Once a connection is available, it can be selected in the tree in the pane on the left. To issue commands to the database, select it from the database list for that server, and choose Query tool… from the Tools menu.
The query tool allows SQL queries to be run against the connected database, and displays the output and results. Enter a query, such as select 'Dart is awesome!';
and then click on Execute in the Query menu.
If you prefer, PostgreSQL also has a powerful built-in command line client called psql
.