The connection is cable modem --> router --> computer(s) The connection between router and computer(s) can be either wire or wireless.
How are you downloading if you don't have at least one computer plugged into the router? (Not the converse, as you don't plug the router into the computer.) A router doesn't do anything such as download, it only does what the name implies; it routes traffic, allowing you to plug two or more computers into one Internet connection. It also provides the radio frequency signal to connect the computer to the cable modem if it is a wireless router. The wireless is an added feature, though, as it still provides the wired routing feature through the plug-in "lan/pc" ports.
"When it's plugged into the router only" makes no sense; you won't get anything, because it's the modem that connects you to the Internet.
If you are talking about using wireless versus a wired connection, the wireless is always going to be slower. The wired connection (computer plugged into the router) will always be much faster than wireless. A speed of 18 Mbps wireless and 32 Mbps wired sounds about right.
What is the difference in speed (if any) that you are getting with a wired connection of modem/router/computer versus modem/computer alone?