What is the past tense and the past perfect tense of the word need?

need is a regular verb so you add -ed to make past tense - needed.

the past participle of need is also needed

Past perfect is had + past participle.

I had needed a new computer and Santa gave me one!