The first thing you should be aware of is that Apple keeps a strong hold on its operating system, whil Android started life as part of an open alliance of 84 electronics firms, backed by Google, with the objective of developing a consistent operating system between them. Android is adaptable, and even though it was purchased by Google, other developers can use it. For example, Samsung uses it it the firm's Galaxy smartphone, and LG also uses the Android OS.
iPhone is specific to Apple, which puts the iOS in direct competition with all other smartphone manufacturers. This is one reason for Android to be outstripping Apple devices in sales. One of the problems with the iPhone OS is its limited compatibility with non-Apple portable devices.