An infinitive is a verb form that can be used as a noun, an adjective, or an adverb. Most infinitives begin with to.
Noun: I have always wanted to visit the Egyptian pyramids. [direct object of the verb have wanted]
Adjective: I may soon have the opportunity to visit the Egyptian pyramids. [modifying the noun opportunity]
Adverb: I may travel to Egypt next summer to visit the pyramids. [modifying the verb phrase may travel]
Do not confuse an infinitive with a prepositional phrase beginning with to. A prepositional phrase always has an object that is a noun or a pronoun. An infinitive is a verb form.
infinitive: to travel
prepositional phrase: to Japan