Video game consoles are just computers that have been custom-built for a very specific purpose. So it's not a huge leap to make a console controller play nice with your desktop or laptop.
It's especially easy if you're talking about plugging an Xbox controller into a Windows machine. Obviously. But even Mac users can take advantage of Xbox controllers for their gaming, albeit with a pretty notable limitation. Setup is very easy though.
First, know that it doesn't matter too much which generation of console controller you want to use, unless we're talking about an original Xbox controller. Those plugged in using a proprietary connector, so you'd need to buy an adapter like this to make the connection. (That adapter doesn't officially support MacOS or Windows 10, either.) Read more...
More about Xbox Controller, Entertainment, and Gaming