If you have an onboard audio card installed in your computer, then you can connect your desktop speakers with the line-out output option available, usually on the back and the front of the computer casing.
For the onboard audio cards, the line-out port is usually green in colour. However, you can still follow the instructions manual that came with your computer, in order to avoid any conflict or problem while connecting the desktop speakers with the onboard sound card.
If your computer did not come with onboard sound card, then you will need to install one. The sound card is used to transfer the sound from computer to the audio output device. In order to install the audio card, you will need to open your computer casing.
If you have a tower casing, then loosen the screws at the back of it and open the left side panel, when you are facing the front of the casing. You will now see PCI slots available on the board. Usually, the motherboards come with three PCI slots. Find a free PCI slot and insert the audio card in it. Now tighten the screw on the plate with the casing.
Now turn on the computer and wait for the computer to detect the newly inserted audio card. A bubble will appear on the right bottom corner, stating that the computer has detected a new device attached to the computer. If the computer automatically installs the software, you can use the audio card straightaway. Otherwise, you will have to follow the instructions manual for the audio card, for how to install the driver.
You can now attach the speaker jack with the line-out port on the sound card. If you do not find line-out written on the ports available on the sound card, you can then check the colour of the line-out port from the instructions manual.