Great question. Let’s start with some wrong ways.
He says, “Would you like to go out with me?” Don’t say:
“I’d rather shoot myself in the f**king face.”
“Aren’t you gay?”
The right way? Be direct but polite: “I’m flattered, but no, thank you.” If you feel like giving a reason, you can, even if it’s a white lie: “Thanks, I’m flattered, but I’m seeing someone.” But you are not obligated to do so.
The humane thing is not to lead the poor schmo on if you know you aren’t interested. If he asks you out for Friday night and you say you have plans, he might ask you out for Saturday night instead, thinking the only problem is a scheduling conflict. So make it clear that you aren’t interested in going out with him on any night. Except don’t say that.
Best to go ahead and stick the dagger straight into his heart and make it a quick death. He won’t realize it at the time, but you’re doing him a favor.