Prepositions in English are very difficult, because there are few standard rules for using them. It is helpful to learn the literal meanings of 'at', 'in', 'through', 'by', and so on - each word represents a literal relationship between two things. However, many verbs require a preposition in order to have a certain meaning, and knowing which preposition to use depends only on practice and memorization. It may be helpful to learn the verb and the preposition together as a single phrase, in some cases. Most native English speakers do not think very much about which preposition to use, we have just absorbed these patterns without thinking about it.
Sometimes one verb can be used with many different prepositions, for a slightly different meaning. For example, the verb 'to talk':
"I talked to my mother." The verb 'to talk' is most often used with the preposition 'to', which indicates movement from one place to another - in this example sentence, the sense is that words move from my mouth to my mother's ears.
"I talked with my mother." Here, the preposition 'with' gives the impression that the conversation was more interactive.
"I talked at my mother for an hour, but she wouldn't listen." This is less common - using the verb 'to talk' with the preposition 'at'. But this can be done to indicate that there was no interactive conversation at all - in the example sentence, I spoke, and it seemed as if my mother was not even listening.
"My mother and I talked around the issue of her divorce." Here, the verb 'to talk' can even be used with the preposition 'around'. Again this is a less common usage for a specific type of situation: to talk around something means to intentionally or obviously avoid an important subject, while talking about other things. (Maybe one could say, Shinzo Abe and Xi Jinping usually talk around the issue of the Senkaku/Diaoyu islands!)