Hi, I'm Robert and I'll be helping you with your computer question.
yes that is definitely a scam
close whatever webpage put the thing up
if you don't do anything it says but just close it and don't go back to the webpage that put it up you should be fine.
It has not done anything except load an ad from a webpage if you can close that webpage your computer will be fine