Should cancel be a button or link?
To summarize
The cancel option is similar to aborting an action, and therefore similar to navigating back to the previous state of the UI. Navigation is represented in web UI as hyperlinks, and thus the cancel option should be a hyperlink.
What are secondary buttons?
Secondary buttons are used for the second most important action. These are often used if you have multiple actions on a page so need more than one button. Your secondary action should be styled differently from your primary action but may use the same colours.
What should cancel button do?
What does the Cancel button do exactly? It dismisses the user's current screen and brings them back to their previous one. This dismissive button is a safeguard to prevent unwanted changes to the system.