Elon Musk has been vocal about his concerns over the potential dangers of artificial intelligence (AI). His warnings have been echoed by other top tech leaders, including Bill Gates and Stephen Hawking.
At root, Musk's concerns are two-fold: 1) AI could be used for malicious purposes, and 2) future AI developments could fundamentally and permanently change or supplant humanity in unpredictable ways.
1) Regarding malicious use of AI, Musk has said that offensive autonomous weapons, or robots that can think and act on their own, could start a global arms race. He argues that such weapons could be used with no moral compass, leading to dire consequences that could include general destruction and chaos. He has warned that AI could "summon the demon" and humanity may not be able to contain it or curtail its power.
2) Musk also fears that artificial intelligence could eventually surpass human intelligence. He has previously compared AI to "summoning the demon" and believes it must be treated with caution and trained carefully to avoid the potential of future AI taking over the world and rendering humans obsolete.
Ultimately, Musk believes that while AI has tremendous potential to benefit humanity, it should be developed and regulated to mitigate potential risks that could arise from potential malicious uses or a scenario in which AI surpasses human intelligence. He argues that governments must do more to legislate artificial intelligence and create meaningful frameworks to protect against potential abuses.
You can read further into Musk's views on AI here: https://www.forbes.com/sites/startswithabang/2018/07/24/what-are-elon-musks-real-fears-about-ai/#4da7f4cc4f4a