Managed code runs under the safe supervision of common language runtime. Managed code carries metadata that is used by common language runtime to offer service like memory management, code access security, and cross-language accessibility.
Unmanaged code doesn't follow CLR conventions and thus, can't take the advantages of .Framework.