You probably mean to convey that the nail plate has separated from its bed, so that the pink area of the nail is smaller than what it used to be. If this is so, then you most probably have onycholysis. This could be due to mechanical insult or due to internal disorder. Sometimes, it can also be due to fungal infection (along with some other features). The treatment and preventive measures depend upon the diagnosis and its probable cause.