I'm afraid it depends on the device. On a really smart device, the
unit may actually login as a LAN client, to the target PC would be a network share and you could simply do a file copy.
The next level down would be where the device acquires a TCP/IP socket on the USB interface. In that case, you'd have to have some sort of client program on the mobile and a corresponding server program on the target PC. This is the same basic idea as on smarter devices, except that instead of getting a client program for free, you have to write your own (or find one).
Below that level, you're probably stuck with doing extremely specialized low-level stuff. Fortunately, all the smartphones I've worked with have had at least some basic TCP/IP support.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.