Shutdown is common process on every Computer. After completing the work most of the us shutdown the computer, shutdown process completed in sequence of task by computer and Operating System. In shutdown process Operating System will end every running process step by step and save unsaved information before power goes off.
If you are near the computer then you can shutdown it properly. But it is not a easy task to shutdown computer from remote and make sure all the running process ends before power turn off.
To doing this you can schedule shutdown process on particular time for example Like shutdown at you Sleeping time, Time to go home after office hours, etc. Every Operating has its on mechanism for task scheduling. through which you can define task for auto shutdown.
Bellow is a step by step procedure on How to schedule shutdown process in Windows and Linux