I used pressure-treated wood, though Henry (and probably others) disagree. DEFINITELY not railroad ties. My box is 2 pieces on each side, one on top of the other. I bought 4 - 4' x 4" x 4" pieces of the wood. I cut 2 of them in half (which comes to 4 - 4' pieces), and the other 2 were cut up into 40" lengths (which is 4 - 40" pieces). That's 8 pieces in total. If you can envision each side of the box being labeled A, B, C, & D, I layed 4' pieces on sides A and C, then 40" pieces on sides B and D. Then I layed 40" pieces ON TOP OF SIDES A and C, and then layed 4' pieces ON TOP OF SIDES B and D. It should fit together like a puzzle. (I hope I got this right, guys.)
The box isn't exactly that big but it's just fine for a few kids to play in up to ages 5 or 6. There are a couple of other things you want to do. I dug my 'pit' down about an inch or so, then layed down some REEEEEEEAL thick plastic. (I think it was 8 mil to keep anything from growing up from the bottom.) Then I filled it with sand. I built a cover for it too. It's a 4' x 4' sheet of 3/8" plywood that I primed and painted for outdoor use. It's light enough for the kids to move too. Sandboxes are notorious for attracting rodents, small animals, cats, dogs, and the like. They make a mess of the box and it's not that pretty. OH, I used 8" galvanized nailes/spikes that can be found at any Home Center. Use 1 in each corner and at least 1 in the center of each pair. (I suggest the centers be nailed from the BOTTOM. This way, the corners are nailed on top and the centers are nailed from the BOTTOM.) PRE-DRILL the WIDTH of the nail, which for me was 3/8", and do the pre-drilling with top and bottom pieces IN PLACE; NOT separately.) If there's any more you need, post up.