Community service is performed by someone or a group of people for the benefit of the public or its institutions. Performing community service is not the same as volunteering, since it is not always done voluntarily. It may be done for a variety of reasons:
governments may require it as a part of citizenship requirements, typically in lieu of military service;
courts may demand it in lieu of, or in addition to, other criminal justice sanctions – when performed for this reason it can also be known as community