Earaches can be caused by inflammation of one of several parts of the ear: the external ear canal or pinna (the "floppy" part of the ear), the middle ear where the ossicles (bones that transmit sound), or the inner ear where the cochlea (hearing organ) is positioned. A primary care doctor
can examine your ear using a otoscope to determine which, if any, of these parts is involved. In general, reasons to see a doctor to evaluate an earache include fever, discharge from the ear, change in hearing, or severe headache
or tooth pain.
The middle ear, which is where a typical "ear infection" occurs, connects to the throat via the Eustachian tube. Normally, air travels in the Eustachian tube between the throat and the middle ear so that the pressure inside the ear is equal to atmospheric pressure. When the middle ear or throat tissues are inflamed, the Eustachian tube becomes temporarily pinched off. Therefore, air cannot flow freely between the middle ear and the outside, and pressure can build up in the middle ear causing a painful sensation. Also, the one of the nerves that innervates the tympanic membrane (which forms one border of the middle ear) also innervate the throat, so that signals of pain coming from the ear can also manifest as throat pain.
Aside from this anatomical explanation, there are other more concerning reasons that your throat might be hurting. These include tonsillitis, which can co-occur with an ear infection, or less commonly an abscess
in the tissues behind the throat. A primary care doctor can evaluate you and your symptoms, to see if these other conditions might be present.