Postgres.app is by far the easiest way to install a local PostgreSQL server on your Mac.
Postgres.app starts a PostgreSQL server running locally on your Mac. The first time it starts it will automatically create a new data directory and set up an empty database. After a few moments, the server will be running and waiting for connections.
Postgres.app can't start when another PostgreSQL server is already running on your computer. If you run into problems, make sure to deactivate or uninstall other PostgreSQL installations. Reboot your computer after uninstalling!
DONE! You should now see a mostly empty database window. There is an “SQL Query” icon you can use to execute queries, and buttons in the bottom bar allow you to create tables and views.