How do a psychiatrist and a psychologist differ?

Type of training. Psychiatrists are medical doctors, which means that, after undergraduate training, they go to med school for 4 yrs or more, then train another 4-5 years in psychiatry (more for child & adolescent psychiatry. Psychologists have about 4 years after undergraduate, then do an internship & postdoctoral training for 2-3 years. Much overlap, but psychiatrists prescribe mediations; pscyhogists test.
Medical School. A psychiatrist went to medical school and completed a 4 year residency in psychiatry treating patients, doing therapy and learning about psychological testing. Psychologist hold a phd and is trained in doing therapy and psychological testing.
Therapy vs meds. Speaking very generally, most psychologists hold either a PhD or a PsyD degree (I hold both) and practice psychotherapy. Psychiatrists hold either an MD or a DO degree, and they prescribe psychotropic medications, and generally do not do all that much therapy these days, but years ago psychiatrists would do both.