Knowing when to use certain prepositions
I am confused about when to use certain prepositions.
I keep reading and hearing "Don't just learn the prepositions, because they don't line up with English; just know which to use with each verb", but there are in fact times where there is no verb! Like times where you don't have a sentence. For example, on electronic interfaces. Even here on italki! I don't understand how to use them and I am always so confused. Like what is the difference between an and auf, and what about an and bei, and bei and mit, I wish I had someone tell me. For example: What's the difference between "beim Eiscafé" and "im Eiscafé"? Does someone have at least a tip for knowing them? Because I actually learned what they mean and still can't distinguish between most of them.
I'm not only asking about those I mentioned, I am asking about all of them!