First off, you will want to upgrade the switches as a stack, unless it is unable to participate in the stack right now.
In terms of upgrading the stack:
1)Download the code that you want to use (image and diagnostic file)
2)Fire up a tftp server app on your pc and point it to the directory that contains the files you DL'ed.
3)Telnet to the stack and log in.
4)Go to "software download" and in there, simply put the iamge name and the IP of your PC, then select "Start TFTP Load of New Image" and select software image.
5)After it reboots, repeat the same for the diagnostic files
Note that some versions of code may require you to default the swwitches after an upgrade.