The simple answer is you need to connect to the vehicle's CAN network. But not all vehicles are the same. And many of them have more than one CAN network. So depending on the car and the things you want to control, the hardware and software will be different.
Nearly all vehicle that support CAN networks, support what is called ISO 11898 this is the dual wire high speed can on the OBDII port pins 6 and 14. To connect to this network you need a hardware interface that supports MORE than diagnostics. So these ELM and ELM-like devices will not do. You need a device like the Mongoose or the ValueCAN (google them for more info). These device support real-time monitoring of ECU to ECU traffic (not the same as diagnostics). The ValueCAN can connect to this network but you'll also need software, at the same site you should find a downloads section then there is a software application called CANcracker (or something like that). This is a free application that helps to reverse-engineer the CAN network.
But be aware that many vehicles don't use the network on PIN 6 and 14 but some on PINs 3 and 11 or PINs 1 and 8 or in the case of GM vehicles PIN 1 has a single wire CAN which is different and doesn't work with the ValueCAN.... I'm not sure about the Mongoose.
It takes a lot of patience but it can be done.
Oh and one more thing the vehicle has to support controlling things via the CAN bus .. just because you connect to it, doesn't mean that you can control it via the network.