Yes, you can get a virus from visiting a website. A virus is one form of malware. Malware is malicious code designed to interrupt the use of, take over the use of, or steal information from a victim device. With each passing day and as technology continuously evolves, hackers are creating new methods of attack.