A forb is any flowering plant that is not woody and is not grass. It is a semi-formal term, in that it does not specifically refer to a certain genera or family of plant. It's a lot like the words 'tree', 'shrub', or 'vine'; we know exactly what they mean, even if your local botanist grumbles every time he hears the word.
Next time you see a patch of grass (or better yet, a meadow), look at it closely. You will see grass (a mixture of various plants that all have long thin leaves; technically what most of us call grasses should be called graminoids). You will also see things that are not grass -- clover, buttercup, dandelion, plantain (the weed, not the tree), chicory, knapweed, filigran, mugwort, milkweed, etc. etc. These are the forbs. We are all familiar with them, but we tend not to group them together in the same way we do grasses.
Ecologists, on the other hand, have long recognized that these plants share ecological roles that justify grouping them together. Grasses tend to be optimized to dominate plains; forbs are niche-fillers, moving into areas where grasses can't survive well. Many forbs fix nitrogen, essentially making their own fertilizer, or have deep roots so that they can live in dry areas. Once forbs have moved into an area, enriching and aerating poor soils, other plants (such as grasses) can move in. Forbs continue to grow in established grasslands, helping to keep the soils healthy, and are ready to take over in cases of drought, soil infertility, and overgrazing. Forbs also provide nutrition to pollinating insects and grazing ruminants, making them an important part of stable climax communities.
Forbs don't live only in grassland and other open areas; the understory of woodlands is largely comprised of forbs, along with shrubs, vines, and young trees. Ferns and vines that do not have woody stems are generally considered forbs, and sometimes the ground cover in a forest is referred to as the forb layer.
Forbs are sometimes defined as being dicots. This is debatable; while many dicots are forbs, there are also monocots that would generally be lumped into the forb category, such as lilies, members of the Araceae and Dioscoreaceae families, and orchids. As I have been unable to find a source or justification for this distinction, I personally choose to ignore it.
The term forbs first appeared in 1924, apparently coined by eminent ecologists Fredric Clements and John Weaver. They took it from the Greek phorbē, meaning 'fodder'.