You can install PostGIS by installing PostgreSQL and then install PostGIS afterwards, or you can install PostgreSQL and then use Stack Builder, which comes with PostgreSQL, afterwards to add PostGIS. Using Stack Builder allows you to download the desired PostgreSQL version and with a single-click also get the correct PostGIS version.
When I installed PostgreSQL 10, Stack Builder did not include PostGIS. By the time of publication, this should have been added. Screenshots may show a different PostGIS version because I used an old copy of PostgreSQL to show how Stack Builder would work. You can download PostgreSQL from https://www.postgresql.org/download/.
As we proceed, I will walk you through installing PostgreSQL and then using Stack Builder to add PostGIS and a database. After downloading the executable, run it by double-clicking...