"Extensions" are regular classes with public methods and properties used to add functionality to an entire workflow application. A workflow application can have only one instance of an extension class.
Extension objects are added to the workflow application using WorkflowApplication.Extensions.Add(). An activity's Execute method can access the extension object by using it's context.GetExtension<TypeOfExtension>() method.
A workflow can add its own extensions in its CacheMetadata method by using the AddDefaultExtensionProvider<T> method of the "metadata" (ActivityMetadata, CodeActivityMetadata, NativeActivityMetadata) input parameter, for example:
protected override void CacheMetadata(NativeActivityMetadata metadata)
metadata.AddDefaultExtensionProvider(() => new MyExtension());