You'd be best to buy a streamer such as WDTV Live, xstreamer, boxee, popcorn hour, asus o-play, etc.
The streamer will read files from your NAS (either wired ethernet, or wireless) and you connect the streamer to your tv (HDMI).
Most streamers will handle pretty much any file type you throw at them, whereas connecting to the TV via USB, you may run into some problems playing certain files (depending how good the software is in the TV).