Epub is a zip file renamed, with some bits in it that says "this is an epub" and other bits that explain what order & metadata are attached to the contents, which are html or xhtml files.
Take any non-DRM'd epub. Change the file extension to .zip. Unzip. Examine contents.
There's a detailed epub tutorial
that breaks down all the steps, if you're interested in the technical side of things. Otherwise, you can get Sigil
and just work on setting up the CSS and let the program handle most of the rest of the arrangements.