There are two passages, one above each testicle that lead basically upward into the body. These are called the inguinal canals. Basically you want to push the testicles into the inguinal canals so that they are no longer hanging down in the scrotal sack.
After I do that, I point my penis straight back and then put two pair of tight fitting panties (two sizes too small is recommended) to keep it all in place. I almost never have any problems with stuff shifting.