Side note: I've taken to referring to each dimension by who OA is in that dimension. The original dimension is "Prairie Dimension" (PD), the second is "Nina Dimension" (ND) and the most recent one is "Brit Dimension" (BD), since OA appears to have jumped into a dimension where she's Brit Marling. This is just my personal system for keeping track of things.
All kids and teacher did those movements so that OA travels into another dimension or to save her from danger (in the final episode)?
It's unclear what, if anything, was accomplished by the kids in the "Prairie Dimension" doing the movements. I suspect it resulted in Steve jumping to the "Brit Dimension" along with OA et al, but that's just my assumption. We'll find out next season.
I think OA was already on her way there thanks to HAP's robots. HAP seemed to know what he was doing when he threatened to send OA to "a dimension where everyone calls you OA, but you yourself don't believe it."
The others back in PD were trying to "help OA" - which certainly would have been accomplished by sending Steve to join her. Others in that group may also have traveled - we haven't seen them in BD yet.
What were all those bodies of kids doing there was it like from the future or from the dimension where she was Nina, how they ended up there (when Hap shows the research part to Nina)?
As explained in the middle of season 2, people tend to "echo" and gravitate towards each other across multiple dimensions, and when traveling, people tend to jump into another dimensions where the people they most "resonated with" are still around them, in one capacity or another.
The kids in the pool were the ND versions of the gang from PD (Buck not included, obviously.) They were there because HAP found them, somehow. He probably didn't know their connection to OA at the time, but as above, people tend to gravitate to one another across various dimensions.
In the final scene its shown she falls on the ground and Steve greets Hap in the ambulance so it's like the story will keep going types (keeping the fact that Homer, Hap and OA will always stay in one dimension simultaneously)?
Homer, HAP and OA have been travelling together thus far, but that's not to say only those three are stuck together. Remember, everyone from HAP's dungeon initially jumped with him to ND. They might get separated (like Homer being "stuck" in the ceiling) or they might be joined by others (as above, I believe Steve at least made the jump from PD to BD.)
My personal working hypothesis is that everyone who's doing the movements at a single moment in time will jump (if they choose - there seems to be an element of choice involved.) Whether they all jump to the same place or not remains to be seen. For example, it seemed to me like Buck jumped into ND, since he alone was still alive there (I guess we don't know about BBA in ND, I don't think she was in the water.) Steve, on the other hand, appears to have gone straight across to BD with OA and HAP, perhaps since he was already dead in ND, or perhaps because he was choosing to join OA specifically.
The idea of Homer jumping into Steve's body (suggested in another answer) is certainly an interesting one, but I'm not sure that I buy it myself. It seems like people either jump into their own double (the lady HAP was with said she was always herself, just different versions of herself, IIRC, and she has traveled extensively) or they get stuck somewhere in between, like Homer did.