Flutter uses a widget tree to represent its user interface as code, allowing for a single codebase to build UIs for multiple platforms. It forms widgets like MaterialApp, Scaffold, Column and Text into a tree structure to define the UI, embracing cross-platform development with one codebase to create interfaces for Android and iOS.