Go under the Apple in the upper left hand corner to "About this Mac". Please give us the operating system information and the amount of RAM. Then go to www.firefox.com and download their browser. Try using that and see if it still shuts down. If if does, then I need you to open it up via the three screws on the bottom of the frame and examine the capacitors (cans) for corrosion and/or bulging (a major issue with this model series). We'll go from there.
Nicole, you may wish to setup a Genius Bar appointment at an Apple Store to have them look at this for. The issue could be any number of things. If it is happening during YouTube play back and not while watching other videos it is likely software related. The issue may be fixed by running "Software Update" which is available from the Apple logo in the top left of your screen. You can try a different we browser. For example, if you are using Safari you may wish to download FireFox (as mayer recommended) and try watching the same video again to test if you experience the same symptoms. There could also be corruption in your operating system which may require restoration. Whatever the case may be, backup any documents, pictures, music or movies that are important to you before taking it somewhere for help.