In real life, stomachs are designed solely to break down food. They are hot, churning sacks full of acids and digestive enzymes and short on breathable atmosphere. Most creatures unfortunate enough to be Eaten Alive only survive inside it for a few minutes at best. Not to mention that most predators tend to chew on, rip apart or grind up their prey into digestible chunks of meat before it even gets that far. However, in fiction, stomachs are often just fleshy bags of holding or prisons for those who wind up inside them. So being Eaten Alive is not nearly as perilous as one might assume. Once whatever or whoever ate a character spits them out or gets destroyed said character will be able to go about their life as if nothing happened.
Sometimes this is justified by the person only being inside their predator's stomach for a brief period before being released, actually having the requisite level of Super Toughness and/or Healing Factor to avoid harm (at least for far longer than your average non-superpowered human would), or whatever ate them having a slow metabolism, but often times most of these Hand Waves aren't even mentioned.
At this point, one of two things might happen. Either the monster is slashed open from the inside or the outside, and the hero escapes unharmed (and usually quite clean), or else he does something to cause the monster indigestion, and get vomited back out. For bonus humor, they may not even be aware they were inside the monster's gut until they provoke this dyspesia.
This trope is the reason why Eat Me works as a combat tactic, since the person will live long enough to kill it from the inside. If the thing that ate the character is a monster or creature and we get an internal shot, it is often a Ribcage Stomach.
A subtrope of Swallowed Whole. In a lot of ways, especially if it's played for Drama, it can be a form of Disney Death.
There are a number of ways that this can be played with:
Protection — Through the use of a magic spell, protective outfit, or an enhanced anti-acid pill, the one who was swallowed will be safe, either through their own means, or that of the one who swallowed them.
Time Limit — It is perfectly safe to be within a predator's stomach, providing that you don't stay too long. In a Safe Scenario, this could be explored as something like a sexual fetish act, wherein both predator and prey can have their pleasures with the prey being let out unharmed, while in Dark Scenarios, the time limit could be used to add to the horror for the prey and portray the predator as a sadist, or if the Prey is committing suicide by being a Predator's meal, as a means to allow the Prey to think about if they really want to go through with it, or change their mind. Death tends to come about after the Prey passes out due to a lack of oxygen, which results in asphyxiation, or drowning in the stomach acids.
Storage/Protective Pouch — This stomach is more of a holding chamber for a future meal, or to protect offspring/small friends from other predators who might tear them to pieces. The chamber just past it however, that's where digestion occurs.
Whales are commonly invoked by writers for this trope across various media, simply because the huge sea mammals were poorly understood for most of human history. Many cultures, even those that have hunted them, hold the cetaceans in awe and feature them in their mythologies. Stories of whales destroying ships and swallowing humans are often heard in many folklores' tales, even though nowadays we know whales are generally shy and easily spooked by people. Not to mention that, despite their immensity, it's mostly impossible for one to devour large prey such as us. Despite all this, whales are still used, since they continue to captivate the imagination. Oceans are not required. Sharks and other large fish are a common alternate option.
This may result in explosive indigestion. When the hero himself simply proves to be inedible, it's Too Spicy for Yog-Sothoth.
This is an extremely old trope and features very often in children's books, though it also shows up in other settings.