It fills the entire device with data and then tries to read it all back. It can tell you how many bytes were successfully read, how many were corrupted and how many were written over by other writes.
Even on cards I know are real I still run the test because I have had a card that had a few bytes that got corrupted which caused loads of issues with my rpi.