There are two kinds of fiber and most sources of fiber contain a mixture of both types.
Soluble:
Water soluble fiber consists of pectin, gums, mucilages, and some hemicelluloses.
Soluble fiber does dissolve in water as well as in the gastrointestinal tract. There, it forms a gel by absorbing water and swelling as much as 10 times its weight.
Insoluble:
Insoluble fiber consists of lignin, cellulose and the remaining hemicelluloses.
It does not dissolve in water as well as in the liquid environment of the stomach and intestines, but it has the ability to absorbe water.
By increasing the bulk of the feces, insoluble fiber helps food pass through the digestive tract quickly and easily.