Both forms are correct. These two words may be problematic and confusing for non-native speakers because they both function in English (British as well as American), they mean the same thing (someone who offers advice), and are pronounced the same way. What is the difference, then? Suffixes -or and -er mean the same thing in English (added to a noun these give the meaning of someone having given profession or doing a said thing) but have different origins. The former is Latin and the latter is Germanic. They are both from the 15th century, but adviser is a slightly older word. Adviser is more popular in the whole English-speaking world. Advisor is more common as a job title in American English, but in any other field, adviser wins the battle.

Definition of advisor/adviser:
noun, someone who gives advice
Our school has got an adviser who can help you with choosing the best college.
Mr. Williams is a Senior Tax Advisor in our company.


Correct spelling

adviser

Correct spelling, explanation: this form is more popular in the whole English-speaking world.

Correct spelling

advisor

Correct spelling, explanation: this form is more common as a job title in American English, but in any other field adviser wins the battle.