Spoiler AlertI am going to have to explain the important points in Interstellar which make up the “plot twist”, so a tl,dr is included at the bottom of this answer.Unarguably, Cooper ends up in the tesseract because of the beings in the movie which are referred to as “They”.The first question to ask here is, “Who is They?”Well, at the start of Interstellar, the characters think that “They” are aliens. Doctor Brand even shakes hands with one whilst going through the wormhole these aliens made.As far fetched as that idea is, though, at the time it made a lot of sense. “They”, after all, are the folks who opened the wormhole near Saturn.“They” therefore have to be aliens, or so the movie concludes. Interstellar’s humans can’t control wormholes because those are part of the fourth dimension, and manipulating one requires being a part of that dimension- it requires being either time, gravity, (or as Brand sentimentally puts it, love). Humans aren’t 4D. However Aliens, theoretically, could be 4D and therefore could make a wormhole for a human.So, “They” is presumably aliens. Good enough a guess, I’d say.The next question to ask here is how Cooper got into the tesseract in the first place.When Cooper gets sucked into the black hole Gargantua, which leads to the tesseract, it is because he intends to lighten the Endurance’s load so that Brand can reach Edmunds• planet with what little fuel there is that remains. While she’s there, there is also data in the tesseract which Cooper can collect, if he survives going into the hole. This data will solve the gravity equation his daughter is solving back on Earth.Yes, Cooper’s daughter, the genius girl who thought there was a ghost in her bedroom. But solving gravity- That’s a big deal, because solving it would allow humans to harness the gravity’s power.Do that, and we’d literally be four dimensional.Brand obviously protests the decision, but, Cooper being Cooper, goes into Gargantua anyway.On the question of the safety of entering such a black hole-You might have heard that people getting sucked into black holes get stretched into something like the diameter of spaghetti. The movie explains that this doesn’t happen because Gargantua rotates.For some reason, the rotation results in no spaghettification (yes that’s a real term). So Cooper travels in relative safety towards the singularity of the hole.At the center of the black hole, is the tesseract- an area of four dimensions.Now, as this dimension materializes, Cooper realizes that the tesseract is in fact a manifestation of Murph’s bedroom- that is, the other side of the room, in the “wrong” dimension. After all, humans are at the time of speaking, three dimensional. Cooper has just passed a door which could not, by law, be crossed, and simply walked into an area where he’s not meant to exist.Seriously though, of all places, Murphy Cooper’s bedroom?Clearly she’s been “chosen” to save the universe, then, hasn’t she?So Cooper floats around and pokes the tesseract here and there, and he realizes another thing- that because he’s inside this tesseract- a four dimensional realm- he can now manipulate gravity and traverse time like a 4D being, as if time were simply a physical canyon he could just climb.He can see Murph through the shelves, because, being 4D, he can see all time. Murph, however, can’t see her dad, no matter how old she is.Meanwhile, though.In Murph’s 3D bedroom back on Earth, Murphy Cooper herself stands as an adult in front of none other than her bookshelves, opposite her father, STILL trying to solve the gravity equation.Sure, she knows that it can’t really be solved without data from a black hole (which was considered impossible, because Cooper was the first guy to go in one and survive), she has a gut feeling that somehow, the answer will be in her childhood bedroom.Somehow.Behind the shelves, Cooper’s next realization is that because he can now use TARS to gather data from the singularity in the black hole. He can also utilize gravity- a 4D object- in order to talk to Murph in coded form.Note, that’s the way “They” first communicated to Cooper and Murphy- that’s how “They” sent them NASA’s coordinates and sent the message “STAY”. With gravity.That’s when it’s supposed to hit you- the aliens- “They”- never existed at all.“They” is actually humans. “They” is just one man. “They” is Joseph Cooper.But how did “They” make sure Cooper ended up in the tesseract in the first place? Well, Cooper did that himself. His future self, now being a four dimensional species, could easily go back in time, simply by moving to another incarnation of Murph’s bookshelf.From that point on, it was pretty much child’s play to find his past self and send NASA’s coordinates to the younger Cooper, in order to tell him- “Hey man, the world needs you and you can save the world at the following coordinates.”He then moves back to the timeframe where his daughter onced placed a watch on the shelf, and uses gravity and Morse code in order to screw around with the watch. The code gives her the data which would solve the gravity equation, which TARS has recorded and gives to Cooper.In the present day, Murphy takes the watch she once placed on her shelf and finds out that it looks broken. Then she realizes that the hand ticks in a certain way- in code. The ghost in her bedroom who was knocking down books was no ghost and no alien- it was her father.So, in a way, though gravity and time helped Cooper in sending his daughter the answer to the equation, Brand was kind of right- love can cross the dimensions too, and it came with Cooper- from three dimensions into four.Without love, Murphy might not have come to the bedroom at all or continued the quest to solve gravity, and thus never have solved the equation.I mean, remember that beautiful, heart-busting “stay” scene?Come on, you can’t possibly forget it.So Murphy solves it in the end, making humans 4D beings- humans can now harness gravity and time.In the future, humans able to work in 4D can easily open a wormhole in the past for Cooper to go through. Once the data is sent, they close the wormhole, and Cooper is ejeted out near Saturn, unconscious, but not without giving a young Doctor Brand a handshake on the way.The whole of Interstellar is one big loop.Cooper and Murphy solved the gravity equation. This allowed future humans to open and close a wormhole in the past, leading to known, habitable planets. That’s how Cooper finds himself in the tesseract in the first place, and why the tesseract is in Murphy’s bedroom.Looking at the past, future humans possesing the solved gravity equation KNEW that Murphy alone could solve it, and that Cooper alone would push himself to such lengths that he’d sacrifice everything to save the human race.So you could argue that it was fate that made Cooper end up in the tesseract, and not die.Really though, Cooper made himself go to the black hole. He sent himself the coordinates. He made sure future humans would be able to get him into the tesseract safely. He sent himself and Murphy all the coordinates needed to alter the future, and the the past.Basically, he made himself save the world.Tl,drQuestion: How does Cooper end up in a tesseract?Answer: He made sure to send himself, that’s how.Edit: Some people are confused about the paradox which occurs in this movie. It is called a bootstrap paradox and points out that a future event cannot influence a present event, because a triggering event must first occur in the present in order to allow the future to have a situation which could affect the past.In the case of of Interstellar, the paradox is that Cooper can't have gone through the wormhole at all, because his future self first needed the gravity equation solved in order to create one. However, younger Cooper could not possibly solve the equation without the wormhole, and in turn, older Cooper can't possibly make the required wormhole for his younger self because he does not have that equation solved.Some commenters (I'll not name names) have called the writing lazy because the story is centered around an unsolvable paradox. I'm going to defend my favourite movie here by saying that this is a movie about time travel. Where there's a time travel story, there is going to be a paradox. However, just because Interstellar’s twist happened to be unsolveable, the writing is not automatically bad or lazy. Interstellar is jam packed with great themes and plot points, as well as directing and visuals, which are in part a product of the writer's script, and I don't believe that a lazy script would produce a story as good as Interstellar. It just happens to be a very well told story with a paradox which can't be solved, but which is needed to tell the tale. Of course, that's my own opinion, but I fail to see why Interstellar can't still be a good story.