Certain and sure are adjectives; certainly and surely are adverbs. Say "I certainly (or surely) am going" and "Bob is a certain (or sure) winner in that contest." Certainly and surely are rarely misused, but sure and certain constantly occur in statements requiring adverbs.
Dictionary of problem words and expressions. Harry Shaw. 1975.