If they are asking for money, or telling you to call a number or go to a website then odds are that once you remove the infection it will be fine, as what they were after was you to be scammed into paying them. Now the only way to be 100% sure is to do a full reinstall of windows, but most of the time clearing the infection is fully sufficient.
If they are not directly asking for money then you should be more worried as there is some other avenue they are planning to make money off of you.
And then finally, spend the $20-25 and buy Bitdefender or Kapsersky. They are almost always on sale on amazon or newegg for around this price point. Windows can't protect itself for crap and the free ones like avg and avast still let more infections in then the free ones.
Lately, dont install random programs or pirated programs for the internet.