You create a TOC just as you would for a print book (Layout > Table of Contents). But it's not necessary to place the TOC if you only want the navigational TOC found in all EPUBS. Create a TOC Style (Layout > Table of Contents Styles) from that TOC. In the EPUB Export dialog, reference the TOC Style (it's on the General panel in CS6).
In addition, if you want an inline TOC that is hyperlinked within the EPUB, place it on a page, but when you create the TOC, click Show Options, and choose the option NOT TO DISPLAY A PAGE NUMBER. EPUB files don't have page numbers.
I tried hyperlinking, but the links don't work after exporting. I know this was an issue with ID5. Is it supposed to be working in ID6?
You shuldn't have to create hyperlinks when you place an internal ToC. At least in CS6, they are created automatically. Here's the Table of Contents dialog in a book I created recently:
When I placed the internal ToC, here's what it looks like. I'm showing it with the Story Editor open to show that the hyperlinks are there automatically. Notice there are no page numbers.
I don't remember (or never tried) to do it in CS5. You might check Elizabeth Castro's books in creating EPUB in CS5, or Anne-Marie Concepcion's video on creating EPUB in CS5 on Lynda.com.