Welcome to iMore!
There are apps in the app store that can do that. I don' recall any names offhand.
Be sure to check the state/country you live in because it's illegal to record phone conversations in some areas, in some areas it's only legal as long as the other person you're calling is made aware that they're being recorded, and in other areas there's no laws at all.