Depends what character you are using.
Fox: ASDI some combination of down and away. If you ASDI away, I believe you'll be out of range of Popo's immediate dash grab, and you can easily u-smash or shine him (or buffer a roll, jump, or spotdodge if you don't trust yourself to time it correctly).
Falco: SDI down and away
Sheik: ASDI away or up (I believe you can jump out if you ASDI up, but haven't tested in a while)
Falcon: SDI up or towards (assuming reverse d-air), I believe down also works
Ganon: SDI up or towards (assuming reverse d-air)
Peach: SDI up or away (not sure if ASDI works at all); up is probably best because they can also reverse d-air you
Samus/Doc: N-air or jump out for virtually any direction you happen to DI
Jiggs: Jump, could probably sneak in a rest, but it's unlikely they'll attempt this on you
ASDI is automatic smash DI, which is what happens when you hold the control stick or c-stick in a direction before getting hit. The c-stick takes priority for ASDI, so you can actually DI in one direction using the control stick (i.e., survival DI by holding up) and ASDI in another direction using the c-stick (i.e. escape DI by holding away).
SDI is smash DI, which is what happens when you input the control stick in some direction during hitlag. It moves you further than ASDI and can easily get you out of grab range. Typically executed by quickly "rotating" the control stick back and forth over a notch in the direction that you want to move, which can result in multiple inputs if you perform it quickly enough.