Dear Saad:
Good day!
The PMP exam is targeted for project managers while the CAPM exam is targeted towards the project team members. People go for CAPM exams if they can’t meet all the PMP exam requirements.
The PMBOK guide is the body of knowledge and both of the exams are heavily dependent on it. The difference is that the CAPM exam is all about the PMBOK guide and nothing from the outside world. However, for the PMP exam, knowledge outside of the PMBOK guide is also tested. This makes the PMP exams harder.
Please let me know if you have any further queries.
Warm regards,
Khurram