We use the term "extension" to refer to Yii2-specific software packages. For general purpose software packages that can be used without Yii, we will refer to them using the term "package" or "library".
Extensions are redistributable software packages specifically designed to be used in Yii applications and provide ready-to-use features.
For example, the yiisoft/yii2-debug extension adds a handy debug toolbar at the bottom of every page in your application to help you more easily grasp how the pages are generated. You can use extensions to accelerate your development process. You can also package your code as extensions to share with other people your great work.