Generally the UI is written with one of the two big GUI toolkits: GTK (Gnome) or Qt (KDE). If you run Gnome, you get GTK and all the apps work without needing to download anything else, but if you have Gnome and want an app using the Qt framework, you'll need to download the Qt libraries, which can be substantial. Even after downloading the Qt libraries, though, the application might still look weird, since it's not a native GTK UI.
The state of WMs on Linux is really, really more complicated than it needs to be.