Modal verb: need to

Present Simple 
She needs to work every day.
She needs help.
She doesn’t need to work.
She doesn’t need help.
Does she need to work?
Does she need help?

Past Simple
They needed to work yesterday.
They needed money.
They didn’t need to work.
They didn’t need money.
Did they need to work?
Did they need money?

Future Simple
I will need to work tomorrow.
I will need you.
I won’t need to work.
I won’t need you.
Will I need to work?
Will I need you?

We use modal verb ‘need’ to say that it’s necessary to do something. We can use it with different constructions, Ex. I might need…, I’m going to need… etc

Difference between 'don’t need to' & 'needn’t'
I have plenty of time. I don’t need to hurry. (=it’s not necessary to hurry, so I don’t really need to hurry)
I have plenty of time. I needn’t hurry. (=it’s not necessary to hurry, I can hurry, if I only want.)

So, there is really small untraceable difference between don’t need to and needn’t. ‘Don’t need to’ is more universal and common.

Difference between 'didn’t need to' & 'needn’t have done' 
I had plenty of time. I didn’t need to hurry. (=it was not necessary to hurry, it doesn’t matter if I did it or not)
I had plenty of time. I needn’t have hurried. (= We hurried, but it was not necessary to hurry) 

Using 'need(s) doing' The carpet needs cleaning = the carpet needs to be cleaned.

See more:

Show all English Grammar lessons