If I erase my iPhone, will this erase my iCloud too?
No, factory resetting your iPhone will not alter your iCloud. Upon setting up your iPhone again you will be given the option to reconnect to your iCloud account if you desire. iCloud also stores iPhone backups that you can restore your phone from. Apple's apps are really good about storing items in iCloud, however many others are not. If you are worried about losing your content, be safe and make a local backup to a machine through iTunes, just to be safe. Alternatively, I believe you could schedule an appointment at the Genius Bar and have them reset your phone for you.
EDIT: If you have "Find My iPhone" enabled, no one will be able to use that device without your iCloud login credentials.