Feedback Resistor and Capacitor in amplifier
To understand why they are needed you first need to understand the basics of the opamp. There are a few simplified rules that you can use to help you solve any opamp circuit:


The opamp will adjust Vout in attempt to make the + input equal to the - input. So when trying to solve for the voltage out, you should set the voltage at the + terminal equal to the voltage at the minus terminal. You don't actually know what this voltage is, so you just have to assign it a variable.
No current flows in or out of the + or - terminals.


If you apply these two rules to your circuit you will find that you can use any other standard circuit analysis method to solve your circuits.

It turns out that you can get some very basic equations for specific configurations, but they all are derived from circuit analysis combined with the rules I mentioned.

If you have a specific configuration that you are having a hard time understanding how it operates, feel free to post a schematic of it and we can help explain it.