I am not sure whether you are asking about the grammar of a native speaker (e.g. a child who is still learning) or a non-native speaker. What I do with non-native speakers who I teach is the following:
(1) I tell them to read more and to "copy" the grammar they encounter when reading.
(2) I systematically go through grammar books and practice difficult grammar topics, again, again, and again (repetition is essential for learning).
(3) I take a conversational approach to practice grammar. I let my students use grammar in conversations and take notes while they are speaking. I later debrief them and analyze their mistakes with them. And then we practice again. Very often, students just need to hear a grammatical structure over and over again.