The most popular way for hackers to take over hosts today is by taking over an application.
This is the reason why application security in corporate computer security systems is a very important aspect.
A hacker can log into the machine, download an executable, ran it, cover his/her tracks by deleting the installer, and log off.