If I erase my iPhone, will my iCloud be erased 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.
No, it won't. Erasing your iPhone has only effect on the device itself. It's even possible to erase your iPhone without an internet connection; how would iCloud then know to erase the data as well?
When you do a restore, only the stuff on your device storage gets removed. As long as you have access to the iCloud account and the stuff you need is on it, it is ok to restore.
But it is still a good idea to do backups too! :)