Let's say according to the RACI matrix, you are responsible for a project, but the project sponsor is accountable for the project. Let's assume you are a bad project manager and you didn't take your responsibility seriously and the project is now way above its budget and behind schedule. Although you were responsible for the project, you are NOT the one to be blamed, the one to be blamed is the person accountable for the project, who is, in our case, the project sponsor.
As you can see, responsibility means doing the project (or task), accountability means taking the blame or the credit, in case that project (or task) fails or succeeds.