Duden lists "stellt unabhängig von räumlichen oder zeitlichen Vorstellungen eine Beziehung zu einem Objekt oder Attribut her" as a definition of "an" and "stellt eine Beziehung zu einem Objekt her ... unabhängig von räumlichen, zeitlichen oder modalen Vorstellungen" as a definition of "in." Can someone clarify the differences between the uses? (Preferably with some examples?)
You can click on the definition or just scroll down the page to get to the examples, which look something like this.
Der Schlüssel steckt in der Tasche. (local)
Sie steckt den Schlüssel in die Tasche. (directional)
Im Sommer machen wir Urlaub. (temporal)
Die Leiter lehnt am Baum. (local)
Er lehnt die Leiter an den Baum. (directional)
Am Wochenende backe ich einen Kuchen. (temporal)
In all of the above examples, the preposition contributes to the meaning of the sentence in the expected way, which I have glossed as local, directional, or temporal.
However, if you look at prepositional objects, the preposition is devoid of meaning (and this is what Duden means by the clumsy phrase unabhängig von räumlichen oder zeitlichen Vorstellungen).
Sie hat sich in ihn verliebt.
Er konnte sich an nichts erinnern.
This is the reason why, if you google "Verben mit Präpositionen", you get these delightful lists you can then try and memorize.
This is not a proper answer, but the difference is that prepositions are mostly idiomatic in collocations and have to be learned, preferably with a post-hoc justification for the virtual direction/position that is implied, just as you said "differences between the uses" instead of "of".
In diesem Sinne, denke ich lieber an etwas anderes, während es an den Lesern liegt, soweit es in deren Macht liegt, die Unterschiede zwischen (oder auch "Unterschiede in" oder "an") verschiedenen Beispielen zu finden.
In that sense, I rather think of something else, while it is on the readers, as far as it is in their power, to find the differences between various examples.
This is easy to learn, as long as it agrees with the English forms, but otherwise an easy tell to make out foreign speaker status, because the collocation is often not logical, but strict--or at least it's not anymore directly apparent how it could have been logically derived.
As a starting point for understanding, the German "in" is the equivalent of English "in" and "into" (in German those two are distinguished by grammatical case), while "an" could be roughly translated as "at" (even though this does not cover all occurrences). Keeping that in mind will probably help you to understand the answers of David Vogt and vectory, which in my opinion are good but did leave out the very first step.