Mary Cole .. Unless you had a service contract with whoever was "looking" at your computer then It was a hacker scam. There are many groups who use that scam in a variety of ways. There are many sources were you can be hacked like that.
Shirley Dalton "Suggest you check all your personal info on your computer. Change all passwords. If they were in your computer they could have gotten all kinds of data you don't want out there." is correct ! You need to check everything on your computer.
Usually and technically that kind of hack is not a virus but it can be. They tend to add "cookies" to continue to gather data. They were probably gathering your data and personal information while trying to scare you into buying their product . When you saw them on your computer they had full access to ALL of your computer information including any of your personal information, passwords, usage, photos etc etc.
In my opinion You should at least system restore your computer to several days before the hack.
I would consider saving all the information you have to save on USB memory sticks, reformat the hard drive, reloading the operating software, add a Web protection Software, (http://www.pcmag.com/article2/0,2817,2388652,00.asp ) run a virus scan on the USB memory sticks you saved to and start clean.
If you have financial information on your computer I recommend that you look at your accounts and inform your bank, credit cards etc etc .
Anonymous Meyers 's advice " When that happens don't contact them or give them money, just shut off your computer and restart." ( or restore to an earlier time) is great advice.