I am just curious. , when u use a script, do u just upload the script file on server and u get a website made?

I know joomla and Wordpress, can I make website using a script. I would like to have hotel booking script.

Is my thinking right? I have no idea how scripts work?