'd

The contraction 'd can stand for any of three different words: did, would, had. Fortunately, its correct interpretation can easily be determined from the words around it.

did

1 After question words such as where, when, why, etc., 'd stands for did*: Where'd you go? means Where did you go? 

____________

*Note that because of this, after a question word, the conditional would can only be expressed with the full form would, since 'd always stands for did. In other words, Where'd you go? would never be taken to mean Where would you go?
The contraction what'd is treated as if spelled whad [wʌːd] (as opposed to short what [wʌt̚]). As such, it behaves just like any other word ending in d: What'd I say? [wʌ̀ːɖaɪ̯ séɪ̯]What'd he say? [wʌ̀ːɖi séɪ̯] (with reduction of he to [i])What'd you say? [wʌ̀ːd̡d̡u séɪ̯]. 
However, you'll hear just as many speakers pronounce it as if spelled whatid [wʌ́ɖɪd]: What'd I say? [wʌ̀ɖɪɖaɪ̯ séɪ̯]What'd he say? [wʌ̀ɖɪɖi séɪ̯] What'd you say? [wʌ̀ːɖɪd̡d̡u séɪ̯]
Note that although not contracted in writing, what time did is commonly contracted in speech to what time'd as in this example: What time'd you get home [wʌt̚.tʰàɪ̯md̡d̡u gɛt̚.hóʊ̯m]

Amy: I had my first date with Evan last night.

Nina: Oh yeah, where'd he take you?

Amy: To that new Thai place on Palm Street.

Nina: Nice! What'd you wear?

Amy: A nice black dress.

Nina: What time did you get home?

Amy: None of your business! hahahaha

had

2 Before a past participle such as seen, given, gone, etc., 'd stands for had and is used to form the past perfect.

Note that it'd follows the same pronunciation patterns as what'd above; it's pronounced either [ɪːd] or [ɪ́ɖɪd].

Did he think it'd helped? 

[dɪɖiθɪ̀ŋk ɪːd.hɛ́ɫpt] or [dɪɖiθɪ̀ŋk ɪɖɪd.hɛ́ɫpt]

In this snippet, note that all the instances of 'd/had are followed by a past participle.

____________

I ran into Mark this morning. I didn't realize it'd been so long since I'd last seen him. We'd actually been pretty good friends in school. He told me he'd moved to England and hăd gotten married and divorced... it's incredible how much someone can change in ten years. 

Interestingly enough, although the past perfect had can be contracted to 'd, a lot of speakers tend to keep the word had separate in the past perfect when the pronoun in front of it has a primary or secondary stress. In this case, the vowel is reduced to a very short [ɛ] and the initial [h] is retained. This usually happens when had follows the subject of the sentence, which, as the topic, has a secondary stress: [hᵋd]

Bart knew us. Wè hăd wòrked for his fáther. 

In this example, we, as the first word in this sentence, isn't completely unstressed. However, in the following example, we have a series of unstressed words (indicated by the dot), including we, and thus the contraction we'd sounds more natural: 

Bart knew us frọm whẹn wẹ'd wòrked for his fáther. 

This is from 002 Birdwatching, where I talk about photographing birds in my local park.

____________

Naturally, I couldn't get too close to them, but I could zoom in and get some pretty nice shots. This was in early spring, so a lot of the birds had chicks. Within two weeks, I hd photographed a good 25 different kinds of birds. 

would

3 Before a plain verb, 'd stands for would and is used to form the conditional, as well as to express habitual action in the past. There are usually indicators in the sentence that let you know which one is meant. For instance, when it's conditional, there's usually an if somewhere, and when it's habitual, there's usually a termporal adverb like every or always.

Here, I'd stands for the conditional phrase I would. This is clear from the preceding if-clause, which expresses the condition under which the subject would hypothetically travel around the world.

If I had a million bucks, I'd travel around the world. 

Here, it'd and he'd stand for it would and he would in the habitual sense; this scenario played out often and habitually in the speaker's youth.

My dad was a total workaholic when I was little. Even when we were on vacation, it'd be midnight and he'd be on the computer writing emails.