To serve is to perform a role or function. While your co-worker is out sick, you gladly serve as his replacement until he gets better.
Serve comes from the Latin word for servant or slave, but you can serve people without being subordinate to them. You might serve your family hamburgers for dinner, or serve the tennis ball. If you serve a cause, you devote yourself to it. Bug repellant will serve you well on a summer fishing trip. In prison you serve time. If you're elected Mayor, you'll serve a term of three or four years.