To connect the antenna to your router use the cable and the antenna input of the router. You may need a small pigtail cable to fit the two.
To connect a modem proceed in the same way as above if it has an antenna outlet. If not, you can try with an adapter which couples the antenna of the modem.