This is locative indeed.
It's a homograph of dative, however it differs in stress: locative is лесу́ (я гуляю в лесу́), dative is ле́су (я вышел к ле́су).
Locative forms exist for a quite large, if limited, number of II and III declension nouns (those ending in a consonant or -ь in nominative), mostly having monosyllabic roots. Usually they designate something things can "be in": enclosures (лес, берег, тень); containers (шкаф, короб, гроб); substances and materials (мёд, пух, спирт); states (бой, бред, тишь); some proper nouns (Крым, Клин, Дон) etc.
Whether or not any given noun has a locative is something you have to learn by heart, and some nouns can confuse even native Russian speakers: пляж, мел, отпуск all technically have locative, however, using the locative form of these nouns sounds quite peculiar to a modern Russian speaker's ear.
Some homonyms have a locative in one meaning and don't have it in another: мир meaning "world" or "peace" does not have a locative; the same word meaning "society" or "laity" does have it.
It is used with the prepositions в and на, and, as the name suggests, mostly it means that something is "in" or "on" the object: гулять в лесу́; быть в раю́. It can also have some secondary meanings: "to be covered or treated with" (рыльце в пуху́; курица в меду́; настойка на спирту́, etc., similar to English "chicken in honey sauce"), "to play on" (играть на басу́), "to swear on" (клясться на крови́) and others.
In yet other meanings the prepositional is used with the same prepositions: видеть в мёде источник богатства ("to see honey as a source of wealth"), делать деньги на мехе ("to make money out of furs") etc. In both cases above, в and на do not mean "in" or "on" in their usual sense.