Attraction in grammar is when words change form to match the other words around them. It's like when you're playing dress up and you want to wear a hat that matches your costume. The words change their hat to match the other words in the sentence.
For example, if we want to say "She and I went to the store," we need to use the right hat for "I." The hat for "I" is "me". If we didn't have attraction, we would say "She and me went to the store." But that's not right! So, we use attraction and say "She and I went to the store." The hat matches the costume of the other words in the sentence.
Attraction can also happen with words that are less obvious. For example, if we say "There is a mouse hiding in the house," we might want to change "is" to "are" because there are actually several mice. Even though "is" and "are" don't look like a hat, they still have to match the other words in the sentence.
So, attraction in grammar is like wearing the right hat to match the rest of the costume. It helps the sentence make sense and sound correct.