This is known as "ransomware". They hold you to "ransom".
The software will often block the whole screen and say you should phone a number to "pay" for it to be removed.
Some of these are worse than others. In your case it looks like a reboot has got rid of it (though it may still be lurking on your computer to reappear at a later date).
Others stay on screen all the time and no amount of reboots can get rid of them. These can be very nasty and are difficult to get rid of.
Some suggestions:
Download Malwarebytes Free Edition and run that to see if it is still there (untick the box at the end of the Malwarebytes install to say you DONT want the "Pro" edition you have to pay for)
If on Windows set up a "spare" Windows userid (easy to do) so that if you get ransomware you still have a spare userid you can logon with.
Always make sure your personal files are backed up in case you need to do a complete Windows reinstall.
Take an "image" of your computer hard disk (there are lots of products around that can do this). Then if your PC does become infected you can do a complete restore from this image.
I can reinstall Windows in about 10 minutes on my PC from one of these images.
Also make sure you have good security software on your computer and that it is up to date and you run it regularly.