I'm in a band. We played a well received gig recently. Parking the guitar in front of the amp is a god way of attracting feedback. What's happening? Well, I knew that the amplifier sound waves coming out of the amplifier make the vibrations bigger, but which vibrations? I had thought it would be by making the strings vibrate more - a resonance effect. According to the Fender website, it is that the sound waves make the pick up coils vibrate and this is called having the pick ups go "microphonic".
https://www.fender.com/articles/tech-talk/friend-or-foe-a-feedback-primer The frequency at which pick up coils vibrate is very high because of the thin wire from which they are made, hence the very high frequency squeal.