I have read the theory of N-type and P-type semiconductors and how they are formed by doping, but I have never understood how the process actually happends in an actual factory/laboratory.

Consider this diagram of the atomic-structure representation of doping Antimony on Silicon. It tells me that there needs to be 1 Sb atom for 4 Si atoms for 1 free electron in every such group. How exactly is this amount correctly administered and how is the process actually done?