'confirm' means to verify the truth of a previously stated belief.
For example, when someone says that there is a holiday today, you 'confirm' it from a trusted person.
'affirm' means to declare a statement positively,
for example,'Mr.XYZ affirmed the death of Mr.ABC as soon as he returned home".
Hope this helps. Suggestions and corrections welcome!