Residency is the postgraduate training period that follows medical school and leads to board certification in a specific specialty. Fellowships, on the other hand, provide further specialized training within a specific subspecialty after residency. Fellowships are optional and allow physicians to gain expertise in a narrower area of their chosen specialty.