An attribute is the property of a product and can be highly useful in an ecommerce store. It can be used for multiple purposes like creating different types of products and changing their descriptions, etc., for better search functionality for your customers.
Here's a complete guide: Create Attribute and Attribute Set in Magento 2