Here's why:
* "Plant" on its own can be a noun (a type of organism) or a verb (to put something in the ground to grow).
* "To" is a preposition when used to indicate direction or purpose.
* When "to" is used before a verb, it creates an infinitive, which is the base form of a verb, often used as a noun or adjective.
So, "to plant" is an infinitive, which acts as a verb in this case.