It's basically a zipped archive that includes XHTML, CSS, image files, and Meta Data.
- if you want to play with one, just
- make a copy of the '.epub' file
- change the extension of the copy to '.gz'
- use your unzipping-tool of choice - you'll get a directory with all the asset files inside.
I read them with FBReader.
Generating EPub
Ca Libre generates EPub or Mobi from PDF, RTF, HTML, Open Office ODT, etc.
ECab is free (but not Open Source), generating from HTML or Plain Text.
Daisy Pipeline is an Open Source set of tools, but sounds a bit complicated
Help And Manual has an Export feature