The brain is a highly vascular organ with an estimate of 10^11 capillaries with a total surface area of 20 $m^2$.
The blood brain barrier is critical for brain homeostasis, it plays a crucial role in providing the nutrients the brain requires and preventing toxins from entering.
The BBB is relatively impermeable and this is due to specific characteristics:
The BBB is in the parenchyma of the brain and is distinct from the blood CSF barrier.

(a) Brain barriers, the brain has several barriers, including the BBB, the outer blood-cerebrospinal fluid (CSF)-brain barrier, and the blood-CSF barrier. (b) BBB structure, the BBB is formed by endothelial cells (ECs) that are in close association with astrocyte end feet and pericytes, forming a physical barrier. (c) BBB transport, routes for molecular traffic across the BBB are shown. Some transporters are energy-dependent (e.g., P-glycoprotein, P-gp) and act as efflux transporters. (d) Tight junctions

Don’t need to know the abbreviations, just that there are many efflux pumps and that maintains the integrity of the BBB.
There are many pumps on the capillaries of the BBB, most of these pumps are efflux pumps. This pumping out of certain substances is a mechanism by which many drugs are prevented from entering the brain. There are, however, some pumps which actively pump substances into the brain but the efflux outweigh the influx.
The BBB is an obstacle for the penetration of drugs and the drugs that do manage to cross are either:
Inflammation (e.g. in meningitis) can affect the BBB permeability causing it to increase, thus allowing more substances in (including antibiotics).