Fifty years ago, people didn't know to avoid bad cholesterol. To avoid is the infinitive

is it being used as an adverb, adjective, or a noun?

Noun; it is an act of doing something, which is avoiding in this case.

It's a noun, used as the direct object of "did know."

Thank you very much

You're welcome.

In the given sentence, the word "to avoid" is being used as an infinitive. Infinitives are formed by the word "to" followed by the base form of a verb (e.g., to avoid, to run, to eat).

Infinitives can function as different parts of speech depending on their role in a sentence. In this case, "to avoid" is acting as an adjective modifying the noun "people." It describes the purpose or intention of people in not knowing about avoiding bad cholesterol fifty years ago.

To identify the function of an infinitive in a sentence, you can consider its relationship to other words in the sentence and the role it plays. In this case, "to avoid" is providing additional information about the people, indicating what they did or did not know.