“Too” is an adverb. It can be used to replace words such as “excessively”, “additionally”, “as well” or “also”. “To”, on the other hand, is a versatile preposition that can be used in various situations and contexts. It's used to indicate a direction, like “toward” and “until”.
Too an adverb: A word that describes, gives more information about a verb, adjective, adverb or phrase.
:To a higher degree, or more than needed.
:In addition, or also.
To is a preposition: A word usually preceding a noun or pronoun, which expresses relations to another word or element.
: Expressing motion, direction or moving towards (a place, person, or thing)