For pre-built systems Ubuntu has a Certification Program. For custom-built systems, there really isn't a foolproof way to check other than installing it and seeing if it works. That being said, Ubuntu works out of the box with no extra work required on probably 80% of systems I've installed it on.
For best performance in applications requiring 3D hardware acceleration (i.e. gaming) using nVidia cards it is a good idea to install the official closed-source nVidia drivers as described here. The default in Ubuntu are the open source nouveau drivers, which while perfectly fine for general work, only provide 2D acceleration and thus are not adequate for recent computer games.
If you have a card with nVidia Optimus (aka Hybrid Graphics), this can lead to some problems, but most people find bumblebee to be a good solution.
If you encounter any problems while using "Try Ubuntu" from Live Media or after installation, come back and search for/ask another question. Welcome to Ubuntu!