Xamarin allows developers to write native iOS, Android, and Windows apps using C# with a shared codebase. It works by compiling C# code into the native platform code, translating .NET into Objective-C for iOS and bridges for Android. Xamarin.Forms provides common UI elements and pages that can be reused across platforms, reducing the amount of platform-specific code needed. Key pages include ContentPage, MasterDetailPage, NavigationPage, TabbedPage, and CarouselPage. Layouts like StackLayout, GridLayout, and RelativeLayout are used to compose user interface controls.