Did + [subject] + [base verb]?
[question word] + did + [subject] + [base verb]?
[subject] + didn't + [base verb]
In the past simple, questions and negatives take did. The main verb goes back to its base form (go, see, work), with no -ed. Did is the same for every person.
Didn't is the short form of did not. Use did not in formal writing.
Short answers: Yes, I did. No, he didn't.
The question word comes first, then did, then the subject.
Be makes its own past questions and negatives, without did.