You will need to learn if you are striving for a goal.

infinitive is: to learn
is it used as an adverb?

Yes, "to learn" is the infinitive, but I think it's the direct object.

it is used as a noun,an adjective,and also and adverb.

To determine if the infinitive "to learn" is being used as an adverb, we need to understand the role of adverbs in a sentence. Adverbs typically modify verbs, adjectives, or other adverbs, providing additional information about time, place, manner, degree, or frequency.

In the given sentence, "You will need to learn if you are striving for a goal," the infinitive "to learn" is not being used as an adverb. Instead, it functions as part of the verb phrase "need to learn," where "need" is the main verb and "to learn" is the complement expressing what needs to happen.

To identify adverbs, you should look for words that modify verbs, adjectives, or other adverbs. Adverbs often end in "-ly," such as "quickly" or "gently." However, not all adverbs have this ending, so it's important to consider the context and function of the word within the sentence.