As long as it has a wireless interface - yes.
If not, you'll need to add one - USB is the easiest, although some maintain it's not the best performing or most reliable.
Personally, I always prefer to use a wired ethernet connection for stationary desktops, and only choose wireless for mobile devices (laptops etc) which mostly have onboard wireless these days.
Most laptops will have wireless built-in. Desktop machines rarely will.
I spent over an hour a few years back trying to get a laptop to connect until I found that my model had a wireless on/off switch - so watch out for that!