PostgreSQL is an object-relational open-source database management system(DBMS). And PostGIS is an extension to PostgreSQL database for managing and storing spatial database objects( geographic objects such as line, rectangle, point, arc and so on).
PostGIS is also an open-source spatial database extender and has many built-in spatial functions that enables us to do various calculations/query on the spatial objects.
Amen Edited answer 15/03/2022