Hi Joaquin,
Need can be used as a normal verb or as a modal.
If you use it as a normal verb you can use in the past, present and future: "didn't need to", "don't need to" and "won't need to" + bare infinitive (infinite without to). Example: "you don't need to buy wine, we have it at home".
If you use it as a modal you can use in present form: "you needn't worry about that" = you don't need to worry about that.
In the past is used in this form "need+have+past participle": "you needn't have bought wine as we have it" = you shouldn't have bought wine as we have it.
Need as modal is not used in the future form.