Let's use learning the 'present perfect' tense as an example. You will want to learn by taking a lot of examples, making sure you understand what makes them present perfect, and then memorizing them.
This is how you would proceed, using English as an example.
- Go to https://learnenglish.britishcouncil.org/en/english-grammar/present-perfect and read the explanations, making sure you understand them.
- Make fill in the blank, word-form flashcards with pictures for every single example sentence there.
- FRONT: "They __ married for nearly fifty years." (to be) [OR you could do: "They __ for nearly fifty years." (to marry)]
- BACK: They've been married.
- FRONT: "have been married"
- BACK: They've been married for nearly fifty years.
- Add notes to the back sides of both flashcards describing why it is in present perfect. (For the previous example, you'd want something like "use present perfect for something that started in the past and continues in the present) on the back side of both cards.)
- Repeat until you have a few examples for every possible use of the present perfect tense.
By doing this you will get a good feel for that tense in those sentences, and an okay feel for that tense in new sentences. Whenever you are speaking or writing and you find you make a mistake with a tense, add that as a new example to your flashcards and it will continue to push you towards mastering that tense.