To work correctly, the algorithms must be precise, unambiguous, indicate the order of execution and have a finite number of steps. They can not be executed forever or require a very long process time because then they would not be useful.
A very simple example to start imagining how to design an algorithm is with access to a website or application. Action that we carry out daily. We could begin to define it this way:
Read user, password
If user = Peter and password = Peter2019 *
Print 'granted access'
Print 'access denied'
The main thing is that before starting the algorithm you have clear the problem to be defined, the data that you will need and of course, the result that you hope to obtain, either numerically or text.