Many people believe that learning languages is first of all about learning rules. This, however, is a mistake, probably caused by the way languages are traditionally tought at school. Mind only little children: they learn a language perfectly, but they do not care (actively, consciously) for any rules. They just listen, repeat, communicate.
Rules are models made by scholars as an attempt to establish certain structures of a language. Those rules can be very helpful in certain circumstances, especially when the language is "simple" in a way that its practice indeed sticks to those rules. Grammar scholars can describe these languages effectively using a rule system. Turkish is a good example for this. (It is not a "simple" language, but its rules system is crystal clear; for learners coming from indo-european language background, Turkish is a logical beauty.) Other languages do not stick that well to rules, causing grammar scholars to add exceptions to the first level rules, and second level exceptions to those exceptions, and so on; eventually the rules system gets more complicated than the actual language. German is a good example for such languages. Latin, in a sense, too.
Nobody speaking fluently German thinks about rules when speaking. The trick is simply knowing what is the correct (or usual) way of expressing things. This comes with practice. Practice may be
reading books and newspapers
listen to radio and TV programmes
write letters to friends
read and write poems
speak, speak, speak, speak, and listen to those who are fluent in that language
Of course, looking up how grammar scholars describe things can sometimes be useful, especially for certain learners with a more analytical mindset. But still, as soon as you are ein a live conversation, you will not think about those rules, you will form your expressions based on what you have repeatedly heared, read, spoken or written.
Fluently speaking a language is like having cut paths through a djungle with a machete. You then follow these paths, knowing that they are good paths. Cutting the first paths is admittedly a lot of hard and slow work. But the more paths you have cut and gone, the more familiar you are with the djungle and the quicker and the more efficiently you will move through it.