You should probably start with the Calibre forum here:
https://www.mobileread.com/forums/forumdisplay.php?f=166
There is an FAQ thread in the stickies that might help you get started, and if you still have questions you will probably get more answers there.