I am a beginner in devops.I am getting confused with the answers on google so posted here.
"Continous delivery" is the general principle of a development process (including development, testing, etc.) producing software in a way where you could deploy often, ideally at any time. In contrast to a classical waterfall model where you would have fixed deployment dates which would be months or even years apart and planned with huge feature sets. These days, this means that there is some CI/CD pipeline which may or may not include the final step of "deployment".
"Continuous deployment" is a specific aspect which means that the final step of the process, the actual deployment, is automated as well, and happens very frequently, ideally on every commit (after running through a rigorous CI/CD pipeline which may or may not include any human interaction).
There is no versus here. Continuous Deployment is an optional sub-part of Continous Delivery.