How to transfer majors?

Would I need to contact my advisor or is there a way I can switch major online?