Malware: Mostly online threats comes from Malware. Malware or Malicious Software has been since the computer came to existence. Early ones were not made by people with bad intention . they were results more of lousy programming or error in programs. Some caused system crashes which are commonly known as BUGS.

Question remains who creates them then? 

These programs are written by some people With thorough knowledge of computing. they can be Hackers, Criminals, Businesses and recently found Government funded organisations.

How they Get in to your system then?

Malware can get in to your computer system in various ways , they can be hidden inside a program and when you install the program it activates itself. Though some websites when you visit them if you do not have adequate security measures etc etc