If the fish was recently added to the tank, the most likely cause is that it's simply feeling nervous about its new surroundings. This is particularly true of non-schooling fish who often like to claim a specific territory that they become comfortable with. Given a few days, the fish should become comfortable with its new home and spend more time out and about.
In the event your fish continues to hide for more than a few days to a week, there is another problem afoot. Until you correct the problem, the fish will continue to remain hidden.
Look For Bullies
If fish remain hidden for more than a few days, the problem may be other fish in the tank. Sometimes the addition of a new fish will bring out aggressive tendencies in tank-mates that formerly were not bullies. What is happening is that fish that previously staked out a territory now feel the need to defend it from the newcomer. One way to tone down aggressive behavior is to rearrange the decor in the aquarium. The former territories are eliminated, and everyone starts fresh with no need to defend their space.
Offer Hiding Places
Many fish do not feel comfortable unless they have a place of their own where they can hide when they feel threatened. Odd as it may seem, providing more hiding places will often cause timid fish to stay out in view more of the time. Stack rocks to form caves, place pieces of clay pots on the bottom, add pieces of driftwood with arches or holes, or use any structures that allow fish to hide. If each fish knows it has its own personal hiding place, it will feel safe and stay out in the open more often.
Fish that normally school with a others of its own kind will hide if kept alone, or if kept in a group that is too small. Always keep schooling fish in groups of at least four or five. If they are kept in smaller groups, they may stay hidden most of the time.