If you buy a new PS3 you will probably not be able to play PS2 games on it. The ones currently for sale are not backward compatible. You might be able to find a backward compatible one for sale used, though. The PS3 is a very good Blu-Ray player if you are interested in that.
The XBox 360 does play many older XBox games, but not all.
As for which is better, it really depends on the games. Fans of each will usually say theirs is better. Some people will point out that there have been some hardware issues with the 360 but I think those have mostly been resolved (and Microsoft has been very good about repairing/replacing faulty consoles). Other people will say that there are fewer games for the PS3, which is true - but they are coming out with more all the time.
You do have to pay a monthly or yearly fee to play online with the 360 and you don't with the PS3 - though so far I personally prefer Microsoft's online service.
If you are going to get one or the other, I would suggest looking at the games that are exclusive to each system and decide which ones you would prefer. Each has some good exclusive titles but most games are available on them both.
Good luck with the decision!