> I`ve done some research and found out, that might be possible with serial or parallel port.
...
> But I´m still unsure, whether it is possible to do with usb.
Well you could decide which interface to use.
If you've got a parallel port, then that's perhaps the simplest option, as there are a few pins where you can directly manipulate the signal level.
You could probably do the same with a serial line, by manipulating CTS/RTS.
USB is different, it is a protocol as well as an electrical interface. You can't just manipulate the signal level as you would want.
FWIW, if you're trying to control something like "turn a heater on and off", which is going to need a lot of power, then perhaps an interface like this is something you should look for.
Eg.
Serial Port Relay Board
There are plenty of suppliers of this kind of kit; check your local electronics shop.