I'll sum it up the best I can.
DI is when someone hits you offstage and you want to survive for longer. When you're launched offstage horizontally, hold your stick down and towards the stage. If you're launched at a lower angle (horizontally but still below the stage) hold down and diagonal toward the bottom-middle of the screen (hope that makes enough sense in writing).
If you're launched up at an angle, hold towards the angle you were going at and down (for example, if Mario hit you with an up smash and it launched you up and left, hold down and left). If you're launched straight up, hold straight down. If you're launched down into the blast zone by a spike move...pray.
When you're launched horizontally, it may also be beneficial to directional airdodge or jump-but airdodge leaves you vulnerable, and a jump means you can't jump again, so depending on the situation you might just want to use raw DI (if I DI and airdodge to survive, Yoshi can jump offstage and nair me, for example).
SDI is when you're in a multi-hit move, such as PK Fire or Witch Twist, or an extended bread and butter combo, like a string of moves Luigi might do out of a down throw. Not as complicated as DI, basically you have to wiggle your control stick in the opposite direction of where you're being hit from. If you're in a rapid jab and your opponent's hitting you from the left, wiggle right to get out. With combos you don't need to wiggle really but you still need to hold away.
Some of this might make more sense in a video explaining it if you're a visual learner.