Resistor represents the amount of resistance in an electrical circuit. The capacitor represents the amount of capacitance in an electrical circuit. A resistor is a component which limits or regulates the flow of current in a circuit. A capacitor is an electronic part that stores an electrical charge in the form of an electric field.
The function of a resistor is to control the flow of current to other components of a circuit. The capacitors purpose is to keep the positive and negative charges separated from each other. It's hooked into a circuit to have the currents and voltages that you want precisely in your circuit.
If you ever look inside of an electronic circuit, you will definitely find three main things. This is because you must have these three things in an electronic circuit for the device to work. These three things are the capacitor, inductor and the resistor.
The resistor monitors the voltage and the current in the electronic circuits whereas the resistor stores the energy in the electronic circuit so that the energy may be used later. And friction is used in the way that the resistor stores its energy. There are different types of energy that is stored in each of these — the capacitor stores potential energy. Also, their measurements are different. The capacitor uses volts and the resistors use ohms as their measurements.