First get the new image and start a tftp server software on your PC. Then copy the new image onto the switch using the command
copy tftp flash:
Follow the prompts with the IP address of the PC with the TFTP server, and the name of the file.
You may need to delete the old version of IOS that is already in flash, dependent on the size of the new file, the size of the existing files, and the overall size of the flash.
If in double, copy the old version off the switch first, using copy flash: tftp , and then erase flash, then copy the new tar file.
Once the .tar is in flash you then extract the contents using the command
archive tar /xtract <tar file name> <Dir to extract files>
Then reboot the switch to check that the new image works OK. If you had a boot command from the previous version, you need to change this to the new one.
An alternative method is to untar the files on the PC, using something like PowerArchiver, and then copy the files individually, using the copy tftp flash: command. Then you don’t need to use the archive, as it is already extracted.
If you don’t need all the web based configuration stuff, then use the second method, it is a lot quicker, uses less flash memory, which allows you the space for more than one version of iOS if you need this.
I hope this helps, and remember, if the switch will not boot afterwards, that is not the end of the world, and you can still get an image loaded, and the switch working again. But that is a different question