How do I upgrade an iPhone 4 from iOS 7.1.2 to iOS 8 or 9 I have an iPhone 4 and I need to upgrade from 7.1.2 to iOS 8 or 9. I would like to ask how I can get iOS 8.
You can't upgrade an iPhone 4 to a newer version than 7.1.2. iOS 8 only supports iPhone 4S to iPhone 6 Plus. iOS 9 supports iPhone 4S to iPhone 6S Plus/iPhone SE.

An iOS support matrix is available here: iOS Support Matrix (additionally: pdf download)