By default, there is no possible way to play PlayStation 2 games on your PlayStation 3. But, you can play PlayStation 1 games either by downloading them via the PlayStation Store, or using the games themselves, if you have any.
If there are any modifications needed to play PlayStation 2 games on your PlayStation 3 system, then I am unaware of any.