To escape the apostrophe in SQL, you can use this code:
INSERT INTO Person
Similarly, you can also do for SELECT Clauses:
SELECT First, Last FROM Person WHERE Last = 'O''Brien'
The single quote or apostrophe is the special character in SQL which specifies the beginning and end of string data i.e. to use it as part of your literal string data you need to escape the special character.
Note: When you manually edit data via the raw SQL interface then only these issues arise. But, in code there are frameworks and techniques which will take care of the escaping special characters, SQL injection and so on.