"Having a debate" means discussing a topic with someone that you disagree about. Although you disagree, you discuss it in a friendly and reasonable way.
We've had an ongoing debate about which school to send the kids to when it's time for them to start school.
Do you remember when we had that debate about whether or not a tomato is a fruit?
You can also use the word "debate" as a verb, without "have". Unlike "having a debate", you can "debate" something by yourself:
I'm debating whether to spend the holidays with my family or go somewhere by myself.