I had a proximal phalanx dislocation. How do doctors fix this?

See below. If this is an acute injury usually this will require a digital block in order to test the stability of the joint. Then depending on if it was a dorsal or volar dislocation will determine the kind of splinting that will be started as long as testing of the joint does not show a problem.
Anesthetize (local o. R general)and manipulate back into proper relationship. If stable with active motion, splint, if not, drive stainless "pins" ( k wires thru joint for several wks while ligaments heal. After removed hand therapy very important for good outcome.