1 Samuel 31:3-6
3 And the battle went sore against Saul, and the archers hit him; and he was sore wounded of the archers.
4 Then said Saul unto his armourbearer, Draw thy sword, and thrust me through therewith; lest these uncircumcised come and thrust me through, and abuse me. But his armourbearer would not; for he was sore afraid. Therefore Saul took a sword, and fell upon it.
5 And when his armourbearer saw that Saul was dead, he fell likewise upon his sword, and died with him.
6 So Saul died, and his three sons, and his armourbearer, and all his men, that same day together.
2 Samuel 1:1-10
1 Now it came to pass after the death of Saul, when David was returned from the slaughter of the Amalekites, and David had abode two days in Ziklag;
2 It came even to pass on the third day, that, behold, a man came out of the camp from Saul with his clothes rent, and earth upon his head: and so it was, when he came to David, that he fell to the earth, and did obeisance.
3 And David said unto him, From whence comest thou? And he said unto him, Out of the camp of Israel am I escaped.
4 And David said unto him, How went the matter? I pray thee, tell me. And he answered, That the people are fled from the battle, and many of the people also are fallen and dead; and Saul and Jonathan his son are dead also.
5 And David said unto the young man that told him, How knowest thou that Saul and Jonathan his son be dead?
6 And the young man that told him said, As I happened by chance upon mount Gilboa, behold, Saul leaned upon his spear; and, lo, the chariots and horsemen followed hard after him.
7 And when he looked behind him, he saw me, and called unto me. And I answered, Here am I.
8 And he said unto me, Who art thou? And I answered him, I am an Amalekite.
9 He said unto me again, Stand, I pray thee, upon me, and slay me: for anguish is come upon me, because my life is yet whole in me.
10 So I stood upon him, and slew him, because I was sure that he could not live after that he was fallen: and I took the crown that was upon his head, and the bracelet that was on his arm, and have brought them hither unto my lord.
In the account in 1 Samuel, we see that Saul killed himself. In the account in 2 Samuel, an Amalekite man comes and tells David that he killed him.
Firstly, note that these chapters are consecutive - 1 Samuel 31 is the last chapter of 1 Samuel, which is a natural place to divide the books, because it ends with the death of Saul, the first king.
This alone makes a contradiction implausible, as it would require:
The solution is that 2 Samuel chapter 1 records a man lying to David. The chapter accurately records someone lying. The narrator is not speaking, as he is in 1 Samuel 31.
The account in 1 Chronicles 10:4-6 also confirms what 1 Samuel chapter 31 says - that Saul killed himself.
So why would the Amalekite lie to David in 2 Samuel chapter 1?
Towards the end of his life, Saul hated David (1 Samuel 18:7-8), fought against David (1 Samuel 23:8), and tried to kill David multiple times (1 Samuel 18:10-12, 18:25, 19:1, 19:10-11, 19:15, 20:31, etc.).
We are told in 2 Samuel 4:10 that the Amalekite thought that David would give him some kind of reward for killing his enemy, when that's not how David saw it at all (1 Samuel 24:8-15, 26:7-9), which is why David has him killed (2 Samuel 1:13-16).
The Bible accurately records so many instances of people lying that it would be redundant to list them all. God expects one to have basic reading comprehension to know when the narrator is speaking (always authoritative), or when its recording someone else speaking - the content of which may or may not be authoritative, depending on the context.