Most of them are usually some bootable Linux distro/emulator/frontend suite, such as Batocera or Lakka. Unfortunately I can't speak for which ones are good or shit. There's also the possibility of the cheaper ones having some kind of malware payload on them; definitely don't plug one in to a desktop/notebook that you care about.
If you're tech savvy and already have the game ROMs, you could actually build a Batocera USB stick yourself and load the ROMs to it. There are lots of tutorials on YouTube etc.