"doctor" is basically "person who holds a higher degree, e.g. a PhD".
It can also be used to refer to a physician, a medical doctor (kuracisto) but it's probably better to use "kuracisto" in that sense. PIV marks that usage of "doktoro" as "colloquial".