How do doctor get wax that's clogged in your ears?

Most commonly, they will fill your ear canal with a prescription liquid that basically amounts to strong hydrogen peroxide, and leave it there for several minutes (it does not hurt, but it sounds like a fireworks display in your ear). Then they will flush the ear canal with warm water, bringing the dissolved and loosened wax with it.