Can you only get the newest ios update on iphone?

I'm a first time iphone user and currently using ios 6. I want to get an ios 7.1 but is that possible when now 8.1 is out?

It depends on your phone. I believe everything newer than the iPhone 4S can have IOS8. So if you have a 3S or earlier, then you can only run up to 6… I think.

No also on ipads on ipod touch 5th generation

Anything over iphone 5 yes