Know your size before you walk in to the store. It's against store policy to try underwear on in Wal Mart anyways but you can never be too careful.
Do not go for the boxers that hang individually with no plastic sealing. These are usually silk boxers with popular TV characters or slogans painted onto them. Kids aren't that tall but their hands can definitely reach up to feel the silk and pick Homer Simpson's nose where the piss gates are.
If you have kids, don't let them do that. Not only out of consideration for the future owner of that pair of boxers but for their own sake. I know it's against store policy to try on boxers but you never know. The kind of person who tries on boxers and puts them back on the rack is exactly the kind of person's unpurchased boxers I would be skeptical of.
You're not supposed to buy individual boxers, anyways. If you must, do not wear them until they've been washed. This is a good rule for everything but especially for Wal Mart, individually hanging, non-plastic sealed boxers.
Go for underwear that comes three in a pack, is taped to a piece of cardboard, and with an unbroken seal. I'd still was these because I'm crazy but it's a safer bet that no Cheetos eating asshole kids and no store policy breaking STD'ed son of a gun didn't come in contact with them before you.
Just, seriously, know your size before you walk in to the store.