How to switch between scenes?

Please use code tags, as described in the stickied post at the top of every forum here.

In order to call a function from a Button, that function has to be referenced in the OnClick event in the inspector. Watch this video on the Unity Learn site for more information, or check the manual for UI.Button, or check the scripting documentation if you want to see what you can access in code.