First, get onto the CLI on your switch and make sure your logging is set to informational.
Then rack the new switch, patch in the stacking cables, and then power-up the new switch.
Now check your logs and you will see what it does. Generally, the master will upgrade the new switch to make it the same version. Sometimes you will need to make this happen by issuing the relevant commands. Either way, the logging will tell you what's happening and what you need to do.