Some municipalities require that all violations be cleared before anyone is allowed to live in the property. These restrictions are being challenged as unreasonable detriments to the sale process. In some areas, new property owners have 30 days to a year to remove conditions that result in violations.
You might want to re-post your question with a little additional information. For if your questions is concerning a home:
Are you a renter and the owner of the real property you live in being sold?
If a commercial building:
Certificate of Occupancy is issued by the city or county that the building resides and is given after all of their prerequisites are meet.