If I create a number of application pools, and then create an application but don't specify which application pool it should run in, which one does it use?
Is it random? Does it always take the first one? Something else?
The default application pool used is defined in applicationHost.config.
Both the sites element and the site element have a child element named applicationDefaults. This has an optional attribute named "applicationPool".
If the application element doesn't have it's optional "applicationPool" element set, it takes it from site.applicationDefaults, and then from sites.applicationDefaults. If none are set the application will fail to run.