This kind of issues are, unfortunately, more common and the we'd like. Thankfully, 99% of the cases are very easy to solve. However, you do need to diagnose what your exact problem is. Do this:
run Firefox in safe-mode to disable all extensions, themes and plugins. If this fixes your issues, be them with RAM or CPU usage, then you know it's a problem with plugins, themes or extensions. Proceed to number 2. If safe-mode doesn't fix the issues, then read bellow, after this list;
update all extensions, themes and plugins in your Firefox. If this doesn't solve the issues, proceed to the following number;
disable all extensions, themes and plugins in your Firefox (not running safe-mode). Being certain that, as in safe-mode, the problems you're having have gone away, enable one plugin at a time. You should be certain that you WANT that plugin to be enabled, so keep your overall number of plugins as low as possible. When you encounter the problems, you know you've found a problematic plugin, so disable it for good. Keep enabling all plugins (except problematic ones) until you've gone through them all.
enable one extension at a time. Again, be certain that you WANT that extension to be enabled, so keep your overall number of extensions as low as possible. Also, try the theme you want to have installed so see if that is what's causing the problem. When you encounter the problems, you know you've found a problematic extension/theme, so disable it for good. Keep enabling all your extensions (except problematic ones) until you've gone through them all;
you're done! You've fixed your problems with problematic add-ons. If you want to keep using those problematic add-ons, please contant their author for support.
Ok, if disabling all extensions and plugins through safe-mode didn't work to bring Firefox's CPU and RAM usage to good levels, then you have different issue. The most likely scenario is that you have a third party software running on your computer that is messing with Firefox. Do as follows:
try reinstalling Firefox. No data will be lost. You can get the latest version for free at getfirefox.com. If that doesn't fix the problem, proceed;
do a virus/malware check on your computer. If this doesn't fix it, proceed;
disable all software running in the background that you don't want to have running in the background (in windows, this is done by pressing WINDOWS+R in your keyboard, typing "msconfig" (without the commas) and pressing enter. Now, under the "Startup" tab, you can uncheck the software you don't want, and reboot your system for changes to take effect. If you're unsure of what software you want running, ask someone with more experience). If this doesn't fix your issues with Firefox, proceed;
check your firewall/antivirus/security suite for enabled functions/features that you don't want and/or may be conflicting with Firefox. You'll find that these features are most likely tied to Internet Security features, such as link scanners or URL checkers and the like. If you're not sure they are conflicting with Firefox, simply try to disable them to see whether or not that's true. As long as you don't browse the web with your antivirus completely off and your firewall completely turned off, there should be no problems. If this doesn't solve the issues, proceed to the following number;
check your operating system security options, mainly advanced options that are not configured by default. While it's very unlikely that this may be the cause of the problem (after all, it's the last item on the list), it's remotely possible. If this doesn't work, proceed to the following point;
update your modem/router software. There have been some reports that some modem/router software may cause Firefox and other browsers to loose performance and/or stability. If updating doesn't fix your issue, try other versions of the software, if possible. If you need support with this, contact your modem/router manufacturer. If this doesn't help, proceed;
clean up your OS registry, using appropriate software. Make sure you've followed my instructions correctly, but if this all doesn't work, create a new Firefox profile (this can be temporary, of course) and see if the issues persist. Report here the results, so we can't help you further.