The thickness and width of premilled lumber (always given in that order) are nominal dimensions; the actual dimensions are always smaller. Thus a 2 x 4 is really about 1 1/2×3 1/2 inches.
For softwood that is to receive a natural finish, or for long lengths of narrow 1-inch lumber that are sound and unwarped, buy clear, or A grade. B lumber has more blemishes, but a long 1 x 8 or wider should be sound.
For wood that is to be painted, and for any 2-inch construction lumber, the cheaper C will usually do.
Although D lumber has knots and warpage, along length will often yield several short pieces of high-quality wood.