You call a function from a script by adding that function (for example the line you wrote) at the place in the engine where you want that function to happen. There are several possible places where you could call that function and it would be called when an actor levels up - it depends which part of the level-up-process you want to happen before your scene, and which part you want to happen after your scene (level up isn't a single line in the engine, it does a lot like updating skills, updating parameters and more).
So your sentence "when player levels" is not exact enough to give you the line where you should insert the code, please describe in more detail what should be done when.
Sorry I was not direct enough, I would to run the script when the player actually gets the level.
For example,
A message states
"Player Reached Level 2!"
then opens a scene
SceneManager.call(Scene_Save) I'd like it to run that code after the player levels up.
And thats it.
The BattleManager's gain_exp method is what triggers all party members to gain EXP (and thus level up). But it does ALL actors and then waits for messages to finish, which is what you'd want it to do, but by the sounds of it one actor at a time. Also, that method only runs in battle, so if you have your actors gaining EXP or levels outside of battle, they'd miss out there.
The Game_Actor's display_level_up method is where the level up display is actually created, but there's no logic to wait for the message there. Ideally you'd put the call at the end of that method, after waiting for the message. So you'd need to create a wait_for_message method and call that, followed by your new scene call. You'd have to see if that interferes with BattleManager's default handling (I don't think it will, but I haven't tested).
Or you could just save all your actor levels at the start of BattleManager.gain_exp, then at the end, if any have a higher level, call the new scene for each of them.