Computers can divide by performing long division, just like grade school except using binary. This needs a subtract-and-shift loop. For early microprocessors, you'd implement the loop in assembly code. The 8086 implemented the loop in microcode, much faster and more convenient.
Many CPUs use microcode internally: a level of code even lower than machine code. Microcode specifies each step of a machine instruction. Each 8086 micro-instruction is 21 bits long, performing a data move and an action in parallel. Microcode is low-level & hard to understand.