What is hacking?
At the end of last week, criminals carried out a serious hacking attack, which affected countries all over the world.
The cyber attack saw a harmful computer programme spread to about 150 countries, including the UK, Spain, Russia, the US and China.
The program - which is called WannaCry - has caused chaos for many organisations.
But the actions of a 22-year-old called Marcus - a UK security researcher who has his own company - helped to limit the damage.
He's being called an "accidental hero" after registering a domain name to track the spread of the virus, which actually ended up stopping it from spreading.
The Wannacry programme worked by locking down computer systems and demanding that people paid money in order to be able to get back into their system.
Some hospitals had to cancel treatment and appointments, while many doctors were forced to use pens and paper to do their jobs, as their computers weren't working.
But why do people carry out attacks like this? And is hacking always a bad thing?
What is hacking?
Hacking is when someone breaks into a computer system.
They break in by going around the usual security, like passwords, and getting in to the computer system via a different route to the official one.
It's a bit like breaking into a house, but finding a different way in other than the front door.
Criminals carry out hacking attacks against businesses or organisations because they want to break into a company's computer systems to cause trouble.
For example, they might want to steal information about customers or to stop an organisation from being able to run properly.
The fact that so many companies all around the world are on the internet makes it easier for hackers to break into systems like this, as so many people are now connected online.
A lot more information is also stored electronically than it used to be.
What is the effect of hacking?
Hacking can have a devastating effect on a company.
- Time is lost as the company try to fix their systems and websites
- The organisation's reputation is damaged, as it shows their systems are maybe not very safe
- They might lose customers if people stop trusting the company and decide not to use their services anymore
- Important or sensitive information about customers could be stolen
- Companies might be forced to pay money in order to get back into their computers - and once they've paid the money, the criminals might not even let them back into their system anyway
Is hacking always a crime?
When hacking is used for harmful reasons such as above, then it is a criminal offence and against the law.
However, knowing how to hack a computer system is not a crime - and you can use those skills in a positive way.
Many companies will employ people who know how to hack and ask them to deliberately try to break into their systems. This helps companies to know if their security is good enough and see where there are problems.
For example, it's a bit like having somebody come to look at your house to tell you which windows need better locks so your house is more secure.
Those who know how to hack are also needed in order to stop hacking attacks. For example, the attack that happened last week was stopped by a 22-year-old cybersecurity researcher, because he had hacking knowledge.
So it can be used for good things too.