On ready-planed material you can look at the adjacent face and see which way the fibres slope.
One certain way is to lightly draw a sharp point over the surface and let it follow the grain.
On rough surfaces, you can tell by the lie of the raised surface fibres.
Some timbers have many tubes (vessels) running between the fibres. When cut at an angle, those with a cylindrical section can appear more or less like the ends of hypodermic needles. The sharp ends point in the way you should plane.
On this sample of American Black Walnut there is a shift in grain angle from the top left corner to the bottom right.
The more or less circular form of the vessel ends in the bottom right section indicates that the grain is nearer to right-angles than the grain in the opposite corner.
Whatever its actual appearance, the growth of a tree is such that it is actually built up from a series of cones. In the case of softwoods such a pines, the cones have softer cores (spring growth) surrounded by a harder skin (summer growth). When sawn into boards, the difference in colour and hardness of the growth rings show as decorative 'flames'.
The drawing shows a board (arrow ed) inside the tree. The left-hand view shows it extracted and turned anti-clockwise. The right hand board is turned the other way.
The flames can indicate the grain direction. If you look at the heart side of the board they point in the planing direction. On the 'bark' side, the converse is true.
In some hardwoods, the vessels grow in rings, so the figure caused by vessels can sometimes be interpreted in the same way. (See the American Black Walnut example).
Since the growth of the more interesting timbers (and some of the dull ones also) is far from regular, you will often find yourself having to plane localised areas against the grain. To cope, you will need a sharp plane, a fine set and a shaving aperture set as small as you can conveniently make it. SeeCoping With Gnarly Grainfor further information.
Especially when working pines, you will have to cope with knots. Inevitably there will be a small area of reverse grain on the far side of the knot. You will not be able to turn the plane round to plane such a small area, so a finely tuned plane with a small shaving aperture is still an advantage even on 'easier' woods.