It forms the outer covering of the body known as the free surface of the skin. It also forms the lining of the digestive, respiratory, and urinary tracts; blood and lymph vessels; serous cavities (cavities which have no communication with the outside of the body, and whose lining membrane secretes a serous fluid), such as the peritoneum or pericardium; and tubules (small tubes which convey fluids) of certain secretory glands, such as the liver and kidneys.
Short answer: protection, secretion and absorption.