This depends. If I know I'm in Gensokyo (or some other beyond-the-rainbow fantasy world, or think it's a dream), I'll probably take my bearings and then trust in my hearing. I'd try to locate a fairy, and get directions to the nearest sanctuary. Since I'm in the forest, chances are high that it's Marisa's place, Mokou's place, or Eientei.
Because I'm an idiot I'd probably also be whistling while I searched. Sure, I'd be afraid of being eaten, but since I'd think there's a 99.9999% chance of it being a dream, I would be more curious to meet whatever came out.
If I have no clue that I'm in Gensokyo because I was in a forest that looked exactly the same just moments ago, I'd probably be whistling anyway, but walking aimlessly until I tried to return and realized I was completely lost. Then I'd be afraid, and try to listen for any sounds at all.