I want to use these Framework to play sound in my iOS app. Can you advise the pros and cons of AVFoundation or AudioToolbox?
You would have to read about the frameworks and see which one is suitable for your use-case.
You should start with this: https://developer.apple.com/audio/
These frameworks are not substitute to each other. They are built for covering various levels of interaction.
For example, if your use-case is covered by using AVPlayer or Media Player then you do not need to use other framework. In case, you need something more out of the system u may consider other lower level frameworks.