Experience only. But know a few things about it; You have to predict getting hit, always be conscious of DIing (don't ever go autopilot), try to always Smash DI (unless it's from a throw that isn't Jigglypuff's fthrow) when you want to DI if there's reliable prediction that you'll get hit, Learn how to wall tech while getting edge guarded (quarter circle DI to the stage then upward), know how to escape Fox's uthrow > uair (hold left/right, then when you get hit, hit both sticks in the opposite direction). Maybe a few other stuff I'm forgetting. There's not really a way to practice it alone