do the resonance structures only apply for oxygen and double bonds?

3 answers

No. Organic chemistry is over run with resonance structures. Most polyatomic ions in inorganic chemistry as well as many compounds have resonance structures.
how do you know when to draw the resonance strcutres?
Generally, when more than one structure CAN be drawn. That isn't always true but it is generally true. For example, I can draw
H:O:Cl: with two dots over the O and Cl and two dots below O and Cl. But I can also draw it as
H:Cl:O with two dots over Cl and O and two dots below Cl and O. However, these are not thought of as resonacne structures because it is known that H is not attched to Cl but to the O. An example might be NO3^- where the double bond can be placed at almost any of the N-O postions. So we draw the double bond to one N-O, then to the other N-O and call those resonance structures.