Prepositions are "indeclinables," which means that the form of a preposition never changes. The same is true of adverbs and, in fact, when you think about it, prepositions and adverbs have a lot in common. There are a number of prepositions which can also function independently as adverbs: Prepositions are pretty easy to use to in Latin: whenever you learn a preposition, you just need to learn which case(s) go with that preposition.
So, you are lucky: when you learn a preposition you only have to learn the dictionary form of the word. The word itself never changes form; it does not take endings.
But... prepositions do govern different cases. Most prepositions require either the ablative or the accusative case, although some prepositions can govern both. When a preposition governs both the ablative and accusative, there is a difference in meaning. For example, in + ablative means "in", while in + accusative means "into". The use of the accusative case often indicates direction to or towards something.
When you learn a preposition it is essential that you learn the case that the preposition governs.
A note about cum. Cum is a very weird word in Latin. Most of the time it is a conjunction, meaning "when". But it can also function as a preposition, taking the ablative: "with, together with." The preposition cum is a source of great trouble for Latin composition: it means "with" only in the sense of "together with, accompanying" (Ambulabo cum amica mea, I was walking with my friend) - if the basic meaning is just "with" in the sense of "by means of", Latin simply uses the ablative, without a preposition (Gladio imperatorem interfecerunt, they killed the commander with a sword).
Here is a list of some of the common Latin prepositions and the cases that they take:
ablative: ab, coram, cum, de, ex, in, intus, palam, prae, pro, procul, simul, sine, sub, subter, super, tenus
accusative: ad, adversum, ante, apud, circa, circiter,
circum, cis, citra, clam, contra, erga, extra, in, infra, inter, intra,
juxta, ob, penes, per, pone, post, praeter, prope, propter, secundum,
sub, subter, super, supra, trans, versus, ultra, usque