The standalone Dative (i.e. without any preposition) can have various meanings in different context, but the MAIN idea is it marks a RECIPIENT of an action.
Try to remember some of the most common verbs which require Dative. Note that no preposition is required:
Я даю книгу другу. Я дарю подарок другу. Я показываю книгу другу. Я продаю книги студентам. Я рассказываю историю другу. Я говорю это другу. Я объясняю грамматику другу. Я помогаю другу. Учитель преподаёт русский язык студентам.
The standalone Dative is also used in impersonal sentences. Here its meaning is similar to the example above: it marks a RECIPIENT of a feeling (i.e. the one who experiences the feeling):
Мне холодно. Мне тепло. Мне интересно. Мне хорошо. Мне смешно. Мне хочется (+ verb). Мне нравится (+ verb or + noun). Мне кажется, что ... etc.
The dative case can also be used with some prepostitions. The most common prepositions which require Dative are "к" and "по". In this case, it is preposition which requires the Dative case. It means you should know what a preposition means, it is a matter of the preposition, not of the case itself.
The preposition "к" usually means a movement "towards" something without getting inside.
Я иду к горе. - I am walking towards a mountain. -It is a direction, but it does not mean you are going to climb the mountain itself. It just says nothing about your further plans. Maybe, you will reach some point near the mountain and stop there. But maybe, you will climb it later.
compare: Я иду на гору. - I am walking onto the mountain. - It clearly says you are goning to climb it.
Мы идём к лесу. - We are walking towards the forest. (But we will not necessarily enter it).
Мы идём в лес. - We are walking into the forest. (And we will enter it).
Я иду к Анне. - I go to Anna. - When you move to a person, only "к" can be used, since you are not going to enter inside someone![]()