In the old "Schoolhouse Rock" song, "Conjunction junction, what's your function?," the word function means, "What does a conjunction do?" The famous design dictum "form follows function" tells us that an object's design should reflect what it does.
Function is one of those words that gets used a lot and means lots of different things. It means what something does, but also what a person does, whether something or someone is doing what they should, and crazily enough, a big party. "Your function is to bring the senator coffee at the political function. He cannot function without it."