Solutions are packages that contain the technical components for a solution/feature. Solutions are useful to move changes from one environment to another. A solution can contain entities, forms, views, web resources, dashboards, site map, processes and many more. Please note, solutions are not aware of templates.
Managed Solution
It is used to distribute customisation to a production environment or is an independent software vendor(ISV) solution. It does not allow changes to its components. The uninstallation of the solution is easy; once the amended solution is deleted, all the customisation components imported with the solution are removed. Manage solution cannot be exported; Dynamics 365 does not allow it by application-level setting.
Unmanaged Solution
As the name says, the unmanaged solution is not managed by Dynamics 365. It allows us to make changes to its components. It is big tricky/challenging to uninstall unmanaged solution because unmanaged solution leaves behind all the imported components. The leftovers can be removed manually. It can be exported as an unmanaged solution is a managed solution.
A managed solution is the right choice if it is distributed as ISV or to the production environment. In contrast, the unmanaged solution can be the right choice when working in a team and team members can change components.