Grammar is the set of rules a language uses for changing word forms and putting words together into sentences.
It also means how well a person follows those rules. She goes works, she go does not; word order matters too.
Here is the agreement rule in one sentence: with he, she, or it in the present tense, most verbs take an -s. So He hates being in hospital is right, while He hate being in hospital is not. Other subjects, like we, keep the plain form: We often go to Edinburgh.
Grammar versus vocabulary
Grammar is different from vocabulary. Vocabulary is your stock of words, such as station, pick up, and late. Grammar is what turns that stock into a sentence, deciding the order and the endings.
The same three words show the difference. I picked her up late follows the rules; I her up late picked uses the same vocabulary but no longer works.
People sometimes say a learner has bad grammar when they simply lack words, or a rich vocabulary when the real gap is structure. Keep the two apart and it is easier to see which one needs work.