Are you talking about the suicide mission then?
First off whoever is usually in your party at the time after you're attacked by the giant probe in the bay after going through the Omega relay is pretty much immune to death. This remains true up until the Human Reaper. More on that later.
There are three ship upgrades proposed by Garrus, Tali, and Jacob. YOU MUST GET ALL THREE or you will lose three crew members in cut scenes while Joker flies like a maniac. I.E if you don't choose Tali when the probes fire on the ship should you fail to get her shield upgrades, Tali dies when the core goes critical, if you keep her in your party Legion gets fried, SOMEONE WILL DIE there if you don't get Tali's unique Ship upgrade.
The remaining crew members will die one by one during the infiltration of the Collector's base unless you do two things. One, you complete everybody's loyalty mission. Two, you select the right squad member for each of the jobs listed. Tali, Legion, and Kasumi are the best choices for the tech part of hacking the door, but you must have completed their loyalty missions. Anybody else will fail and the other half of the squad will be killed. Garrus, Miranda, and Jacob make good squad leaders when you need them, Jack and Samara/Morinth are good choices for Biotic protection; avoid using Thane, Miranda or Jacob for this, as their biotics aren't strong enough. Again you must complete ALL of the loyalty missions for everyone to survive.
Jack, Grunt, and Zaeed work well when you need someone to escort the freed Crew Members, but Mordin is the best choice. If you didn't recruit Legion you MUST go straight for the Omega 4 relay to save your entire crew after the Collectors capture everybody. If you do recruit Legion you have time to take care of some other business but after you complete Legion's loyalty mission you will have to go to the Omega 4 Relay to save your entire ship crew. Otherwise if you fail to make haste and do any other missions between the Collector attack (if you didn't recruit Legion) or Legion's Loyalty mission (if you did recruit Legion) only half your Normandy crew will survive. If you didn't do the escorting Squad Member's loyalty mission they will all die.
Again you will have to choose a squad leader while you face the Reaper. Same squad leaders above will work.
After you face the Reaper any Squad Members with you that you didn't do the loyalty mission for will die in the falling debris. If they lived through it they will make it back to the Normandy with you.
If all the squad members die, Joker will not be able to shoot and save Shepard meaning Shepard will bite it and that file will not be able to move on to Mass Effect 3. If at least one Squad Member survived they will catch Shepard and pull him aboard while Joker provides cover fire. That Shepard will move on.
In the end it all comes down to making sure everyone is loyal by doing their loyal missions. Be careful as Tali's can be a little tricky. Hopefully you've been increasing your Paragon/Renegade bar with those interrupts. If you choose to present Tali's father's research to save her name she will not be loyal. You ether have to shout down the Admiralty via Paragon or Renegade, withhold the information to get Tali exiled, or if you let both Veetor go with Tali at Freedom's Progress and saved Kal on Haestrom by making him keep his head down and not take on the Colossus (Paragon Interrupt) you can rally the crowd making them both speak up and get the Quarians in the crowd to shout down the Admiralty for you. Those will make Tali be loyal.
After you complete both Miranda and Jack's loyalty missions they get into a Catfight (Sorry, no ripped clothes, INORITE?)and they make you pick a side. Whoever you chose to side against will not be loyal to you anymore. If you've been racking up your Paragon or Renegade up to... I think 70% but full just to be safe, you can shout them both down without losing ether one's loyalty. If you don't you'll need a full 100% Paragon to persuade ether one to talk to you again and regain their loyalty.
Sadly the same thing happens between Tali and Legion after completing both of their Loyalty missions (Look we're going on a suicide run! Can't we all just get along?) and you'll need to ether side and make up with a 100% Paragon with whoever you sided against or shout them both down with the Paragon or Renegade option without losing ether one's loyalty.
When everyone is loyal they're ready to go, just upgrade the Normandy's Shields, Armor, and Firepower, choose the correct Squad Mate for the collector's base jobs and you shouldn't have to morn over any of those coffin's in the Cargo Bay after the Collector Run. Have everyone loyal before going to Reaper IFF mission. Then get legion loyal.
Then go through Omega-4 relay immediately after crew abduction. For specific tasks on suicide mission, use (all used must be loyal):
Tech specialist: Kasumi, Legion or Tali
Group leader: Garrus, Jacob or Miranda
Biotic Specialist: Jack or Samara
To get your crew safely back to Normandy, use some squadmember weak in combat (like Mordin).
When you face the reaper, choose weak squadmembers (like Tali, Kasumi or Jack) with you. This leaves best possible defensive team to hold the door behind you. Everyone should survive.