Question: how adware get on your computer?
Answer: Similar to a computer, you can get adware through a browser vulnerability that can allow pop-ups ads.
When a bad app is infected with adware, you can be bombarded by persistent ads.