In addition to the various lengths and thicknesses of boards, there's also both treated and untreated wood options. Both pressure-treated ... especially under less than ideal conditions ...
Yes, you can sink untreated lumber into the ground for certain applications, but keep in mind that if they're untreated or lack a protective barrier, they won't be immune to deterioration over time.