Server side scripting as the name says, the scripts meant for server and client side scripting means the script meant for client.
What is sever?
To run a website, we must have to keep all the files related to the site at a specific location. This location is called server. Server contains all the files required to run a website.
What is client?
Any browser that helps to access the website is known as client. We use chrome to access a website, therefore chrome is a client. We use firefox browser to access a website, therefore firefox is a client.
Server Side scripting
Scripts that help to fetch data from the server and loads into the browser is known as server side script. The process of scripting is known as server side scripting. In simple words if we prepare script for servers then it is known as server side scripting.
Server Side scripting language ; There are plenty but PHP is one of them. Widely used scripting language.
Client side scripting
Server resources are expensive. The long server takes time to load, that much resource is consumed. Therefore wise approach would be to fetch data with consuming less resources and execute rest task in the client side. For example, if we want to load 1000 records from the database to the browser and stylise the text with various style. Then using server side scripting is not wise. We should use server side scripting language to fetch the data but we must use client side scripting language to stylise the required style.
When to use Server side Scripting language?
If we want to get data and load into the browser the we must use server side scripting language.
When to use Client Side Scripting language?
To execute any task that does need server resource consumption, then we must use client side scripting language.