All components have inductive and capacitive reactance, so in effect, all components are resonators. Even a resistor has inductive and capacitive values. For that matter, so do conductors. At RF frequencies, the reactive properties of circuit board traces can be a problem, and sometimes path routing is critical.The connection leads from every component are separated by a distance, so there are two conductors separated by space. That forms a very small capacitor. When a voltage differential is applied across the device, an electrostatic field sets up in the dielectric of the air.
The wire leads into the device also act as inductors. When current flows through the device, a magnetic field is setup around the conductors. That gives the device inductive reactance.
So no matter what the device is, it has values of capacitance, inductance and resistance. There is a frequency where the device acts as a resonator, without any other components attached. This is the self-resonant frequency of the device. It's usually a very high frequency.