Explain how a code segment or program functions.