What could cause ears to have been ringing and my tonsils to be swollen?

Viral infection. Without a direct look at your tonsils, it is difficult to answer your question. But the ringing in the ear is probably of little importance. The association of a tonsillitis early on and the presence of tinnitus is probably of viral origin. Consult an ENT physician.