Man in the middle attack
Imagine you are standing on the sidewalk in a city. You open your Wifi settings and connect to the first unencrypted network. Free internet, no problems, right? Not really. Anyone around you can easily intercept pretty much everything you are doing on the internet. This includes passwords, images, messages... everything. There are a few ways to protect against this though. Option 1, is to use HTTPS (Not HTTP). HTTPS is an encrypted web protocol, which basically means everything you view or send over HTTPS is protected and much more difficult to view from the point of an attacker. If a webpage doesn't support HTTPS, you can use the second option: A VPN. A VPN is a Virtual Private Network. Basically, your internet connection is routed through another devices (Your VPN provider) this will hide your identity and enecrypt everything you send over the internet. Keep in mind that your VPN provider will be able to see everything you do on the internet, so only use a VPN from a provider you trust.
These attacks are fairly easy to avoid if you are on the lookout for them. The #1 rule to avoid phishing attacks is: If something seems to good to be true, it probably is. Phishing attacks is when someone trys to trick you into giving them private information such as your email, password, or credit card. Another way to avoid a phishing attack is to always check the web url. For example, if you are signing into your Google account, and the URL isn't accounts.google.com, obviously, something isn't right. Another thing to watch out for is for emails that appear to be a news-letter. If you get an email that you don't want, your first reaction is probably to hit "unsubscribe" on the news-letter. This is a bad idea! A better plan would be to block that email address. Sometimes scammers will try to send spam to random emails. By clicking "unsubscribe" you've basically just told that scammer that you are a legitmate email.
A keylogger is exactly what is sounds like. A virus that logs your keystrokes. This is obviously really bad. All your passwords, web searches, messages, and everything else you type can be silently recorded by a keylogger. Recognizing these is fairly difficult. One indication that you have a keylogger is if your keystrokes are strangly slow or delayed at some times. The first way to prevent keyloggers in the first place, is obviously to be careful what your download. The second way is to install a good antivirus. I reccomend using Avast or AVG as a free antivirus. The third, most difficult way, is to manually go through all of your tasks by hand. On Mac, you can do this using the Activity Monitor application. On Windows you can use Task Manager. Go through every task and look for ones that don't look familiar. Another indication is if a certain task is transmitting data even though they don't seem like they should. For example your supposed "Notepad" process is sending data over the internet, something probably isn't right.
Ransomeware is awful. Imagine going to your computer and turning it on, just to be greeted by a message that your computer has been encrypted and that you need to pay $500 to unlock it. Terrible, right? So how do you avoid this? Well, if you have a Mac, it really isn't that hard! Objective-See (https://objective-see.com) offers plenty of free security software, including a program called RansomWhere (Not ware). RansomWhere lets you monitor all process that are encrypting data in an effort to locate Ransomware. If you see a program that is encrypting data that you don't think it should, simply click "Terminate" on the Ransomwhere dialog!