Diode PN Junction Understanding
A hole is not the result of a charge-neutral atom losing an electron. A hole is created when an "acceptor" atom is located in a silicon crystal but that atom does not have as many electrons available for bonding as do the silicon atoms. Silicon atoms bond by sharing a pair of electrons, each atom contributes one electron to the bond. The acceptor atom leaves one bond unfilled, and it's that unfilled bond that constitutes the hole. Note that although this hole exists the atoms are completely charge-neutral. It's easy for a wandering electron to get stuck in the hole, and when that happens the acceptor atom actually has one more electron than it normally would...thus it has become a negative ion. The captured electron came from somewhere...some atom that was also previously charge-neutral...so that atom has become a positive ion. Since we have an immobile negative ion and an immobile positive ion, an electric field exists between them.

As holes are filled with wayward electrons the e-field increases in strength until it prevents any more movement of electrons. At this point the depletion region has been created. This region is depleted of free (mobile) charge carriers but the impurity (non-silicon) atoms are ionized.

I've mentioned silicon but the same thing can be done with some other materials, such as germanium and gallium-arsenide.