The entire script consists of options to raster2psql tool, where to store the output, then a call to psql utility to load the data into postgresql
rasterschema.rastername: Postgresql database internal structure is made of schemas - which are actually databases, and among other things, tables. So in this case it means that the import SQL script that will be generated by the raster2sql utility will try to import the data into a database called rasterSchema and table called rasterName (i think they must preexist)
Second part... what you should be looking is this:
> raster.sql (note the > char)
This means that the output of the raster2sql utility once you run it, will be directed into the raster.sql file (which will be created from where you call the utility)
The last part: psql till the end, is actually a call to psql admin tool for postgresql, and all parameters are related to loading the script file that the raster2psql tool will generate.
-H option means the hostname where postgresql server is running (this is localhost if your database server is running on your workstation)
-U option = username for the database
-d = database to which data will be loaded
NOTE: -P option may be needed in your case (password)
and finally -f raster.sql is the script that the psql utility will attempt to run.
Question 2: answer should look something like this:
raster2sql -s -t 50x50 -f -I -Y C:\Users\Desktop\dem.tif Raster.Elevation > raster.sql psql -h localhost -U your-user-name -P your-password-if-needed -d Raster -f raster.sql