Need is used both as a principal verb and as an auxiliary verb.
Need as a principal verb
When used as a principal verb need means ‘require’. The principal verb need is followed by an infinitive with to. It has the forms needs and needed.
We need to help her.
I need more time to finish the job.
We have got what we needed.
We need to find a way out.
You need to talk to him.
As an auxiliary verb
As an auxiliary verb, need remains unchanged whatever be the person or number of the subject. The auxiliary need is common in questions and negative sentences.
You need not ask my permission.
She need not wait any longer. (NOT She needs not wait any longer.)
They need not make an issue.
You need not talk to them.
Need I discuss this matter with her?
Need we wait any longer?
The negative adverb hardly is often used with need.
I need hardly say that I am very interested in this offer.
We need hardly say that we are eagerly looking forward to meeting you.
Need is also used with only.
You need only say what you want.
She need only talk with him and the issue will be solved.
Need can be used in questions.
Need I wait any longer?
Need we write to her?
If the answer is in the negative, say ‘No, you need not’. If the answer is in the positive, say ‘Yes, you must’.
Need I come again? No, you need not.
Need I come again? Yes, you must. (NOT Yes, you need)
Need + Have + Past participle
When referring to the past time, need is followed by the perfect infinitive (have + past participle). This structure is used to talk about unnecessary things that happened.
She need not have lost her temper. (He lost her temper but that was unnecessary.)
You need not have refused that offer. (You refused that offer but you shouldn’t have done that.)