Epub files are actually .zip files which have the extension changed. This mean that there are several ways to edit them.
First you could rename the file so that the end is .zip instead of .epub. You can then proceed to unzip it and edit the files with your favorite html editor such as notepad or kompozer. When you are finished you can re-zip the folder and change the extension to .epub again and then download it to your ereader.
The second way I found is with Calibre. Calibre is not really an epub editor but more of an organizer or bookshelf, like itunes for ebooks. The first obvious step is to download Calibre from the internet. Once you have it installed you can add your books. Once you have the books you want you can right click it and click tweak. This opens a window which makes sure you really want to do it where you should click explode, then it creates a temporary folder containing all the text, css, and image files so you can again edit them with an html editor. Once you are finished, return to the Calibre window and click the rebuild or preview button. I personally had some problems with the book when reading it on my ereader though so I would use the next option I found.
Third, the one which has worked the best for me is Sigil. Sigil is actually designed for epub editing so it works quite well. First you download it from the internet and install it. Then you run the program and open the epub file you would like to edit just as you would with any other file editor. Once it loads it will come up with three sections. The one on the left shows all of the individual files within the epub. To edit them simply double click on it and it will come up in the middle section just as it would in your ereader. To edit it simply click and type just like in a word processor. If you would like to edit the html or xhtml code simply click on the <> button in the tool bar in the top of the window. On the right of the screen there will be another section which shows all of the chapters which is useful for navigation also.
I have two other suggestions pertaining to epub editing. The first is to use the user guide. At first I ignored it because I thought it would be very generic and not answer my questions but I looked into it and it's actually quite discriptive and helpful.
The second is to know about html coding. w3schools is a great resource.
Other than that you can ask me if you have any questions.