What is an Algorithm
The word
"Algorithm" relates to the name of the mathematician Al-Khowarizmi, which implies a procedure or a technique. In another words algorithm is a
step by step writing a program in your own words. An algorithm may be a sequence of
steps to resolve a specific problem or algorithm is an
ordered set of unambiguous steps that produces a result and
terminates during a finite time.
Algorithm has the following characteristics:

2) Output: Each algorithm is expected to produce at least one result
Advantages
of an Algorithm
1) It could be a step-wise representation of an answer to a given problem, which makes it easy to understand.
2) An
algorithm uses a definite procedure.
3) It
is not dependent on any programming language, so it's easy to know for anyone
even without having prior programming knowledge.
4) Every
step in an algorithm has its own logical sequence so it's easy to debug.
How to write Algorithms:
Step 1 :
Clearly define your algorithms input: Many algorithms requires data for processing, e.g. Algorithm to calculate the area of rectangle here input will be the height and width.
Step 2 :
Clearly define the variables used : Algorithm's variables allow you to use it for more than one place. Here we have to define two variables for rectangle height and width named as HEIGHT and WIDTH. Before declaring a variable name we should keep in mind that the variable name should be meaningful. e.g. instead of using H & W use HEIGHT and WIDTH as variable name.
Step 3 :
Outline the algorithm's operations: We should use input variable for computation purpose, e.g. for finding the area of rectangle we have to multiply the HEIGHT and WIDTH variable and then store the resultant value in new variable (say) AREA. An algorithm's operations can take the form of multiple steps and even branch, depending on the value of the input variables.
Step 4 :
Output the results of your algorithm's operations: In the above case of area of rectangle output will be the multiplication of HEIGHT and WIDTH stored in variable AREA. if the input variables described a rectangle with a HEIGHT=2 and a WIDTH=3, the algorithm would output the value of AREA=6.