Strictly speaking, Spanish nouns do not have the cases we are used to. A word does not change its ending every time its role in the sentence changes. In Russian, we say: дом, дома, дому, домом, о доме. In Spanish, however, the noun usually stays the same, and the needed meaning appears thanks to a preposition or word order.
Let us look at a simple example with the word casa:
Veo una casa.
I see a house.
Estoy en una casa.
I am in a house.
Hablo de una casa.
I am talking about a house.
Voy a una casa.
I am going to a house.
In the English translation, the form of the word does not change either, but in Russian or Ukrainian it would. In Spanish, casa remains casa. Only the small words before it change: en, de, a. They take on the work that endings often do in Russian or Ukrainian.
That is why the expression “cases in Spanish” should be understood conditionally. Spanish does not make you memorize six forms of one noun, but it still shows who performs the action, whom the action is directed at, to whom something is given, what someone is talking about, and with whom something is done.
For example:
el coche de Pedro — Pedro’s car;
una carta para mi madre — a letter for my mother;
trabajo con Luis — I work with Luis;
pienso en mis planes — I think about my plans.
So the case meanings of Russian or Ukrainian do not disappear. Spanish simply expresses them not with endings, but with prepositions and constructions. Pronouns, however, really do change more noticeably: yo, me, mí are different forms, although they may refer to the same person.