Can anyone please explane why likely is an adjective here,(It was likely to happen.).thanks in advance..
It was (the) (most) likely (thing) to happen.
'likely' describes the noun 'thing'
Cf.: He is likely to come soon. (1)
He will likely come by car. (2)
(1) He + to come (complex subject)
'Is likely' is a compound nominal predicate which consists of the link verb 'is' and the adjective 'likely' as its nominal part. Though it ends in 'ly', don't let it misguide you. A word in this function would be an adjective, not an adverb. For example, She is beautiful. 'Beautiful' is an adjective. It would be ungrammatical to say 'She is beautifully'.
(2) He (subject)
will come (simple predicate)
likely (adverbial modifier). It is an adverb and characterises the predicate 'will come'. You can test it by substituting another word which has different forms for the adjective and the adverb: He will definitely (not definite!) come.