I'd probably start by reading the developer FAQ:
https://wiki.postgresql.org/wiki/Developer_FAQ#How_do_I_get_involved_in_PostgreSQL_development.3F
and subscribing to the pgsql-novice(at)lists(dot)postgresql(dot)org mailing list.
To get a copy of the source on your machine, the docs:
https://www.postgresql.org/docs/current/git.html and
https://wiki.postgresql.org/wiki/Working_with_Git may also be helpful.