GPS works fine in a case or pocket.
You do need a generally unobstructed view (from a radio perspective, not necessarily a visible perspective) of the sky (no trees/buildings/etc. in the way, but thin barriers, like say a tent, won't present a problem.) in order to pick up the GPS signals from the satellites.
Ideally, you should have as clear and as wide a view of the sky as possible. Ideal conditions would be standing in a flat empty field with visibility to the horizon in all directions.
Narrow that view of the sky by adding buildings and trees and your ability to obtain an accurate lock starts to degrade and you get more and more error in your position, until such point where you can't get an accurate lock (or in extreme cases, like being in a deep basement or similar, any lock at all) at all.