The thalamus, nestled deep inside the forebrain, gets its name from the Greek word for “inner chamber.” It is often referred to as the gateway to the cerebral cortex. The sensory pathways from the eye, ear, and skin all relay in the thalamus before terminating in the cerebral cortex.
Thalamic neurons send axons to the cortex via the internal capsule. As a general rule, the axons of each internal capsule carry information to the cortex about the contralateral side of the body. Therefore, if a thumbtack entered the right foot, it would be relayed to the left cortex by the left thalamus via axons in the left internal capsule.
References
Bear, M., Connors, B., & Paradiso, M. A. (2020). Neuroscience: exploring the brain, enhanced edition: exploring the brain. Jones & Bartlett Learning.