And that he wasn't simply a literary device used mainly by Plato to describe his ideas and detail his stories? There's no way that Plato's works were simply dictations of his time with Socrates - and more often than not, he was simply a literary device rather than Plato giving historical details surrounding Socrates' life and death.
We know Socrates existed because Plato wasn't the only person who wrote about him. Xenophon, another student of his, wrote several dialogs as well as including a conversation with Socrates in his Anabasis. Perhaps the strongest evidence for his existence, though, is Aristophanes' play The Clouds. Though nominally fictional, it portrays Socrates onstage as a useless fraudulent Sophist - but, still, one can still recognize comic treatments of the same ideas which Plato and Xenophon attribute to the actual Socrates.
hi! you may be interested in these previous threads
tangentially related: