The good news is that eBooks are available in many formats and many readers are available to read them both as dedicated devices and software that can be used on many devices.
The bad news is that most readers read only one format that is tied to a specific device or store from which an eBook is purchased. Many eBooks are compatible only with that type of device or software. For instance, an eBook purchased from Barnes & Noble cannot be read on a Kindle or with Kindle software. This is also true of free eBooks though in the case of most free eBooks, you can simply download in the format of your choice.
Read more from Wikipedia on eBook formats.