Prefect (from the Latin praefectus, substantive adjectival form of praeficere: "put in front", i.e., in charge) is a magisterial title of varying definition, but which, basically, refers to the leader of an administrative area.
A prefect's office, department, or area of control is called a prefecture, but in various post-Roman empire cases there is a prefect without a prefecture or vice versa. The words "prefect" and "prefecture" are also used, more or less conventionally, to render analogous words in other languages, especially Romance languages.
Praefectus, often with a further qualification, was the formal title of many, fairly low to high-ranking, military or civil officials in the Roman Empire, whose authority was not embodied in their person (as it was with elected Magistrates) but conferred by delegation from a higher authority. They did have some authority in their prefecture such as controlling prisons and in civil administration.
The Praetorian prefect (Praefectus praetorio) began as the military commander of a general's guard company in the field, then grew in importance as the Praetorian Guard became a potential kingmaker during the Empire. From the Emperor Diocletian's tetrarchy (c. 300) they became the administrators of the four Praetorian prefectures, the government level above the (newly created) dioceses and (multiplied) provinces.
For some auxiliary troops, specific titles could even refer to their peoples:
Roman provinces were usually ruled by high-rank officials. Less important provinces though were entrusted to prefects, military men who would otherwise only govern parts of larger provinces. The most famous example is Pontius Pilate, who governed Judaea at a time when it was administered as an annex of Syria.