The Playstation 2 does not use Component cables(red/green/blue), only Composite(yellow/red/white).
Composite inputs on the TV should look like this: http://www.xbitlabs.com/images/other/samsung/s3-2.jpg
Simply plug the cables from the PS2 to the TV via their colors: yellow to yellow and so on!
Now the Playstation 3 can use the Component cable. It can also use HDMI!
Component looks like this: http://www.hardwarezone.com/img/data/articles/2002/553/component.jpg
Keep in mind that with Component, you will also need stereo audio(red/white) too! Some Component cables come with these two audio cables, some don't.
HDMI looks like this: http://www.hometheatermag.com/images/archivesart/1105hook.15.jpg
HDMI carries both audio and video in one cable. Plus it's capable of carrying full HD(1080p) resolutions. No other cable can do that. Component goes to 720p(video) or 1080i(picture).
Hope this helps! Let me know if you have anymore questions.