What can cause ringing noise in the ear or brain?

Many possibilities. The most common cause of ringing (tinnitus) is hearing loss. At your age, it is unlikely that the cause of your tinnitus is hearing loss, but it needs to be ruled out. Other factors may also contribute to tinnitus in the absence of hearing loss, e.g. Tmj dysfunction, excessive caffeine or alcohol consumption, medication side effect, etc. See your local ENT to further evaluate this symptom.
Tinnitus. Most of these problems are due to degeneration of the auditory apparatus, especially associated with aging, but can happen after head trauma, and associated with hypertension, anemias, and thyroid problems. Rarely, transmitted sounds occur with congenital vascular malformations, and obstruction of large neck blood vessels.