how does the sensory information of stepping on a nail travel to the brain and what area of the brain it reaches?

Answer :

Because humans have five senses: feel, see, taste, hear, and smell. When you step on a nail you basically going to feel it and you brain can sense that and it can trigger nerves which can cause pain.