Foundation is composed of several distinct layers depending on your platform and requirements:
Swift Foundation
Shared library in the Swift toolchain written in Swift. Provides core types (URL, Data, JSONDecoder, Locale, Calendar) via FoundationEssentials and FoundationInternationalization modules.
Swift Corelibs Foundation
Shared library in the Swift toolchain (Swift and C) providing compatibility for pre-Swift APIs. It provides NSObject, class-based data structures, NSFormatter, and NSKeyedArchiver. It re-exports FoundationEssentials and FoundationInternationalization. Note: compatibility is best-effort as implementations differ from Objective-C.
Foundation ICU
A private library wrapping ICU, used by FoundationInternationalization. If you do not need ICU-based internationalization, import FoundationEssentials instead to avoid this dependency.
Foundation Framework
Built into macOS, iOS, and Darwin platforms. It is a combination of C, Objective-C, and Swift that compiles swift-foundation sources into a single Foundation module.