First of all, I am not sure what you mean by 'extension', but I am assuming you are referring to is the different Magento 'editions'.
Code-wise, in a simplified way of answering your question, the Cloud edition has everything Commerce does (plus some additional tools), so you can directly compare Commerce vs Open Source just to have an idea of what the Cloud edition has as opposed to Open Source, so please check this https://magento.com/compare-open-source-and-magento-commerce.
Please check one of my answers on a question about the different Magento editions in the context of hosting to AWS. Although this is not precisely what you are asking for, I am sure it will help you understand the difference between the editions with regards to not only the code, but also the infrastructure.
Concerning installation of modules on Cloud, please check what the official documentation has to say on this:
Magento installations hosted on Commerce Cloud require an extension to
be installed in a Magento development environment where the
integration can be tested and deployed to a staging environment before
being pushed to production. To learn more, see Install, manage, and
upgrade extensions in the Magento Commerce Cloud Guide.