This is an extremely broad question.
When you're learning about security and penetration-testing, you're
supposed to learn all these techniques.
There are loads of techniques each with it's own purpose, situation,...
To give a small answer on your question,
Social engineering is often used, and so are backdoors.
Lastly I had to write a PoC (Proof of concept) for a webshop.
They had a design-flaw and XSS-error, the point is, that I could hack the
computer of each visitor (not user, just visitor); this attack was a mix of:
Website exploitation (XSS & the design flaw), basic social-engineering, exploiting a browser-vulnerability using BeEF & Metasploit, triggering a backdoor (reverse_tcp_meterpreter) on the user's machine.
Like you see, this attack took four to five different things in order to succeed, but at the end, I had control of the user's machine (my own machine of course in this example, it was a PoC).
Other ways to attack a machine on your network, is by seeing if he uses a specific service which has a vulnerability using port-scanning.
On your computer you have specific services running which need to listen to a specific port, most of the time, a port-number is related to that service. (e.g, 80 & 443 are HTTP(S) and thus mostly browsers). You can scan a machine on 'open' ports, if a port is open, you can look the port-number up to see if it matches a specific service. If it does, maybe the victim is using an old version of that service-software and that vulnerability can be exploited through that port.
When software has e.g a buffer overflow-vulnerability, it can be exploited. No matter if the payload is coming from an user-input or from a socket (port).
Than, you also have frameworks like e.g Metasploit who specialise in exploiting systems like Windows. In some cases you can get shell to another user's computer without none or very little user-interaction.
Metasploit relies on vulnerabilities in the system's software like flaws in platforms like Adobe, Java,...
Maybe you also remember that a few years ago a few people took down the Playstation & Xbox-network on Christmas?
They did that with programmatically exploiting a network-vulnerability which allowed them to infect the systems on that network with a backdoor/trojan.
But if you're in the same network itself (e.g, you hacked the Wi-Fi password, or it's a public network,...) you can do things like MiTM-attacks (Man In the Middle, intercepting and manipulating packets) with almost none user interaction, or something similar like network-sniffing.
But getting access to another computersystem without any user-interaction is hard. When you e.g deploy malware to a user, and it's e.g a trojan which needs to communicate to a C&C (Command-and-control server), your trojan needs to bypass the firewall in order to be able to communicate with the outside-world. This can be done with social engineering and than user-interaction is involved (e.g tricking the user on clicking "Accept firewall exception").
If you'd do this without any user-interaction, you'd need to be able to add your firewall exception programmatically (which ain't a problem with the Windows API), but then yet you'd need to privilege escalate to get root access, to actually add the exception.
Privilege escalation without user-interaction or social-engineering would be done by first finding a system-vulnerability which allows that, and than exploiting that vulnerability programmatically.
With luck, you can use already found vulnerabilities and pre-made exploits with e.g Powershell-scripts, to use that as payload, in your actual payload.
As you see, tons of options; but your question is hard to answer because it's too broad, and it differs from situation to situation.