Chief engineer is a senior staff position aboard a Federation starship, the officer (or noncommissioned officer) charged with responsibility for the operation and maintenance of the ship's power, environmental, and other key systems. (Reference book: Star Trek Encyclopedia)
The chief engineer holds responsibility for all engineers and engineering duties aboard a starship or starbase. He or she must have a general knowledge of all technical workings to ensure his or her team are assigned to handle and complete engineering tasks competently.
The position holds a wide range of duties, including creating and maintaining shift rosters for relevant personnel and providing advice to the captain or senior officer on technical issues. As a member of the senior staff, he or she bears accountability for the ship's or station's performance.
Some chief engineers with lower-than-expected ranks can be promoted to chief engineer by a senior or commanding officer. For example, Miles O'Brien held the rank of chief warrant officer but was chief engineer of the USS Defiant. (DS9: "The Search, Part I", et al)
An old Earth term from the British navy renamed some Chief Engineers to the shortened term: "ChEng".