Is it possible to get a virus on an iPad Air? I went on a website and some ads (the ones that open up another tab on your screen) popped up.

Then I did some research and it turns out the website I went to is fake and is known for hacking, however I did not enter any personal data so I just want to know if it's possible that either the website or the ads somehow got a virus into my iPad.

(note that I did not interact with the ads I just simply closed it after the page loaded!)
Short answer

The simple answer to your question is that anything is possible. However, is it likely? No.

Long answer

Technically speaking, a virus is just code that replicates itself by creating copies within other pieces of software. One of the best things about iOS is that it doesn't actually allow applications to directly access other software on the device. This makes it, well, almost impossible for a virus to replicate.

Note: - The only reason I don't say it's impossible is because I basically don't believe anything is impossible!

Now, in your case, you visited a website that is dodgy and the best thing to do in that situation is to immediately leave the website - and that's exactly what you did!

Also, viruses aren't the only things to be wary of. Malware, spyware, worms and trojan horses are all risks for computer users. However, because of the App Store, the risk of these things is extremely remote (from memory, the only reported cases involved the Chinese App Store, and Apple became aware of this very quickly and resolved it).

So, in a nutshell, I think the biggest risk you could have faced is malware. That's because dodgy websites are known to use pop ups to inform users that their device is infected with a virus, and then tricks them into installing malware on their device by pretending to help them make it more secure.

However, since you didn't click on anything or download anything the risk is almost nil.

You can rest easy.