It's called "Ransom Ware" and be careful, there's a particularly nasty version that locks up your computer completely. It activates on start-up and you cant get into anything, not files, settings, control panel, system restore, nothing...
My 11 yo niece got that one (don't know how...) and all I could do to get rid of it was wipe the hard drive clean...