Flight attendant duties run far and wide, from aircraft safety to unruly passengers. Cabin crew are trained to be prepared for medical emergencies as, tragically, deaths onboard do happen.
The scenario you've probably seen on TV can be quite different from real life. A staffer will ask if there's a doctor on board and the situation eventually ends in an emergency landing.
However, pilots aren't required to make emergency landings and passengers might be none the wiser. In fact, a former flight attendant said fliers may not even realise they are sitting next to a dead body.