The word grain is usually used for the edible seeds of a cereal grass, such as rice, barley, or corn (maize). A cereal grass’s fruits—the fleshy or dry ripened ovaries of a flowering plant that contain seeds—are also often referred to as grains.
Technically, most grains are actually a type of fruit with a seed that is difficult to separate without milling. The scientific name for this type of fruit is caryopsis.
So, depending on how the word is used, grain can mean just the seed or the seed with the fruit attached to it. (It doesn’t help that grain is also used as the name of the type of plant that produces grains.) In everyday usage, though, grain and seed refer to much the same thing.