As with most desktop computers, yours does not have a built-in WiFi adapter, you must either install a WiFi card if there's a suitable empty slot, or buy a plug-in USB WiFi adapter.
However, using a wired connection (ethernet) is preferable to using WiFi on a desktop PC which is in a fixed location. You might want to consider buying a pair of powerline adapters to facilitate this if your router is too far away to use CAT5 cable.