Before Secrets of Faydwer, only certain races and classes could forage. Wood Elves and Iksar could forage regardless of the class selected, with a permanent skill cap of 50 in the case of classes not normally able to Forage. All rangers and druids could forage, though druids had a restriction to the success of their foraging.
With the Secrets of Faydwer expansion, all races have the ability to forage, but an AA has to be purchased. When the AA Foraging is purchased, the foraging cap, whatever it is, is increased by 50. Those races or classes that have Forage already have their cap increased by 50. Those races/classes, like dwarves, that do not forage, gain the ability to forage, but with a cap of 50. Bards have a cap of 55.