Native speakers learn English prepositions from context and by actually communicating. This gives them a few important advantages over someone trying to learn prepositions from dictionaries.
Prepositions in phrasal verbs
The biggest advantage of learning prepositions from context is that you don't expect them to have a meaning out of context. Prepositions in English often work as parts of familiar phrases, not as words like "replace", which have a pretty clear meaning that can be understood out of context.
The fact that English prepositions work as parts of phrases is a major stumbling block for people learning English as a second language. If your native language doesn't work this way, it can be hard to believe until someone points it out, so here are a couple illustrations:
The phrase "disappointed in somebody" is itself a unit of meaning. You can think of it almost like a word. The word "in" in that phrase shares very little common meaning with "in" in "Someone's in the kitchen with Dinah." That's the primary meaning of "in": containment. The phrase "disappointed in" echoes the primary meaning just a little bit, but the phrase has a meaning of its own. You can't understand the phrase by looking up the dictionary definitions of "disappointed" and "in" and trying to combine them.
The phrase "fitting in" is itself a unit of meaning. Here's an example: "When I was in high school, I had a hard time fitting in." The phrase means getting people to accept you within a social group. Notice that "in" does not introduce a prepositional phrase. There's no noun serving as the object of "fitting in". The word "in" follows the verb and changes its meaning. This is very common in English verbs.
Sometimes people call those phrases "phrasal verbs" to distinguish them from verbs whose meaning is entirely contained in one word. But really, there is no precise boundary between phrasal verbs and single-word verbs. Native speakers don't think of phrasal verbs as clearly separate from single-word verbs. Native speakers easily combine prepositions with single-word verbs in new ways, by analogy with familiar combinations, which they know from experience that other people are familiar with. This question is about "toggle in", a phrase not found in dictionaries, but which a native speaker—in context—easily understands by analogy with the familiar phrase "type in". Out of context, though, a native speaker probably couldn't figure out what "toggle in" means.
So, the only way to really understand English prepositions is to become familiar with a large number of these phrases. Then you can vary them or make new phrases by analogy with them in new situations. That's how native speakers learn them and use them. A dictionary definition can only vaguely point to the vast range of ways that a preposition seems to fit into phrases. It can't communicate the preposition's meaning in all those phrases—because the preposition really doesn't have an independent meaning of its own most of the time. I posted some more about learning the phrasal aspect of English under this question.
The rhythm of prepositions
An advantage of learning by talking is that you pick up the rhythm of the language. The rhythm of English is important for many reasons, one of which is that prepositions have different ways of fitting into a sentence depending on their grammatical role.
When a preposition introduces a prepositional phrase, as in "Someone's in the kitchen with Dinah," it's normally quick and unstressed and it works rhythmically like an upbeat in music. The preposition's rhythm leads to the next stressed syllable. If there's an article between the preposition and the noun, it gets even less emphasis.
But when a preposition doesn't lead to a noun, as in "fitting in", it gets emphasis: it's stressed and said for a longer time. If you say "FITting in" (giving weak emphasis to the last two syllables, as if "in" were introducing a prepositional phrase), people won't understand you.
Regarding nuance or why people choose one preposition over another, sometimes the main reason for a choice is just to make a good, understandable rhythm. Most books and classes that teach English do not teach anything about sentence rhythm, and I've never seen a word about it in a dictionary. Prepositions have a rhythmic role that native speakers learn mostly by imitating other native speakers. Of course, you can do that, too. You can focus on the rhythm of sentences in recordings, and imitate not just the words but the rhythm and intonation, too.
Prepositions as direction words
As a native, something else you learn from English prepositions is a certain way of thinking about direction, motion, and shapes, and how to fit that information into a sentence. Specifically, a preposition after a verb of motion usually indicates the direction or destination of that motion, as in "Dinah went in." Many languages don't work this way; in the Romance languages, you would use syntax like "Dinah entered". So, as natives master English prepositions, many verbs of motion feel incomplete without a preposition to finish the thought. More information about this is here, including verbs that don't work with prepositions in this way.
Another habit of thought that native English speakers have is equating a shape with a path of motion. For example, someone might say that a pipe loops over a wooden beam. Since prepositions usually indicate direction, they play an important role here. See this answer for some illustrations of verbs of motion used this way. Note the use of the preposition "around".
As a non-native, you can explicitly focus on how prepositions add direction to verbs of motion for a while. That will help you acquire some of the same habits of thought that natives acquire in childhood. Many phrasal verbs draw upon prepositions' role as providing a direction to complete a thought, in order to make useful analogies with motion or shape.
I've never read anything specifically about how native English speakers learn prepositions. The above are just educated guesses, mostly based on common confusions of foreigners and common ways that natives fail to understand a foreigner's confusion when answering a question (suggesting that the native's habit of thought is so deeply ingrained that they don't attend to it consciously).