Cable modems typically function as bridges and not as hosts. This means the traffic passes through unmodified on Layer 2 or higher.
I guess one might use the phrase "connected to his cable modem" to mean "connected to the device directly behind the cable modem." but it is technically inaccurate the way most people would usually mean it.
Nine times out of ten a cable modem's ethernet interface is connected to a router (or a single computer), and that's what has the IP and that's where it's possible to make a TCP/IP connection.
If a cable modem has a built-in router, the actual "cable modem" part of the device is a bridge, bridging to an internal router.
Some cable modems have management or diagnostic webservers accessible via TCP/IP on the LAN side (192.168.100.1 is typical), but you usually cannot get to that from the WAN side.
DHCP, the protocol that assigns an IP address, uses UDP. I don't think TCP is involved at all. So if no other network traffic has happened since DHCP gave whatever device on the other side of that modem an IP, no TCP connections are established. UDP is part of TCP/IP so some "TCP/IP" traffic did happen though. Unless your cable ISP assigns the customer a fixed IP and the IP is already programmed into the device behind the cable modem. Then this would not happen.
TCP/IP connection can only be established between programs running on
computers or other devices like tablets and so forth?
There are many devices that talk TCP/IP. Equipment at your ISP's central office can certainly intercept your traffic ("captive portal" type of thing - Comcast download warnings or Verizon authentication failure "interstitial" page, for example) and connect to whatever device is behind the modem. So it is possible.
1What makes you think a cable modem isn't running any software? Hell, there are managed switches and motherboards out there that allow IP connections to them... Also, you have to consider visibility in case of techniques like NAT. – a CVn – 2013-09-22T20:09:47.530
<pedantry>If you really want to be correct, a connection cannot be established with an IP, it can only be established with the hardware to which that IP has been assigned. An IP is just a number.</pedantry> – terdon – 2013-09-22T20:11:44.657
You can definitely establish a connection to a cable modem... It is a network device and most have internal web servers for configuration. – Brian Adkins – 2013-09-22T20:12:42.510