Need can be used in the following ways:
as a transitive verb (followed by a noun or pronoun object): I need a drink. ♦ Do you need anything? (followed by an infinitive with ‘to’): ♦ She needs to rest. ♦ You don’t need to worry. (followed by ‘to’ without a following infinitive): ♦ You can stay longer if you need to.
as a modal verb (usually followed by an infinitive without ‘to’): This is the only thing you need do.
The modal verb need is mainly used in questions and negatives, which are formed without ‘do’: Need I pay now? ♦ You need not worry. In American English, except for a few phrases such as ‘need I say more?’, the modal verb is used only in formal language and some journalism.
The negative need not is often shortened to needn’t in conversation and informal writing. The modal verb need does not change its form, so the third person singular of the present tense does not end in ‘-s’: He need not take the exam.
The ordinary transitive verb need has a regular past tense needed: They needed to be careful.
The modal verb need has no past tense, but it can be used in the pattern need not have/needn’t have followed by a past participle, to show that although someone did something, it was not necessary: You needn’t have waited for me.
The ordinary transitive verb has a future tense will need: You will need to show your passport.
In many cases, especially in questions and negatives using the simple present tense followed by an infinitive, there are two possible patterns: Need I come with you? = Do I need to come with you? ♦ He needn’t come. = He doesn’t need to come.