is it necessary to employer to give annual salary increase to the employee? or it's depends to the contract?
Nothing is necessary, everything is a choice.
To elaborate, organizations and employees are bound by the contract the sign to follow. I'd be a bit surprised if a full-time employee contract does not include a clause for performance and remuneration review on a given cycle (yearly). However, I'd not be surprised if the result of the review does not end up in increase in salary. There are multitude of factors which depends on the paycheck revision - and just "being on payroll" is not one of them.
In other words, there's no "guarantee" that you will have an increased payout after every review cycle, however, it's usually likely that you'll get some amount of hike. However, as you mentioned (are you sure?), there is no clause in the contract about the revision of salary, so company is not "bound to" give you a hike.