PCSX2 is an emulator that lets you run PlayStation 2 games on a Windows, Linux or macOS machine. It recreates the console's hardware in software, which is why it can also improve on the original with higher resolutions and better filtering.
You will need a reasonably modern processor and, for demanding titles, a decent graphics card. The emulator itself is legal and free; you supply your own game discs or images from discs you own.