2nd declension nouns will always follow this pattern of word endings, based on their case (place within the sentence) and number (whether it is singular (just one of the thing) or plural (more than one of the thing)).
In the 2nd declension, there are two patterns a noun could follow: m/f or n. These will be explained further later on. For now just know that most 2nd declension nouns follow the m/f pattern, but occasionally you may come across one that uses -um (singular) or -a (plural) for the nominative, vocative, and accusative cases. All other endings are the same.
If we use the example of the 2nd declension (m/f) noun amicus (‘friend’), based on its place in a sentence, it would look like this:
Singular
amicus - the friend does something
amice - addressing the friend
amicum - something happens to the friend
amici - of the friend / the friend’s something
amico - to/for the friend
amico - from/with the friend
Plural
amici - the friends do something
amici - addressing the friends
amicos - something happens to the friends
amicorum - of the friends / the friends’ something
amicis - to/for the friends
amicis - from/with the friends