Back with another question

when do we pronounce "ed" as "d" & when to pronounce it as "t" and just "ed

......