I am trying to find out how a flash drive works. I want the theory used
To answer that question would take a small book, can you be more specific? What type of FLASH drive?
Do you mean how to program one or how it operates? Have you visited any of the manufacturer's sites?
How Memory Works: http://www.kingston.com/tools/umg/umg03.asp