DO NOT connect the ground wire to the grounded (neutral) conductor, as this could lead to current flowing through the body of the dryer (and potentially through you).
The installation guide for the dryer will have wiring instructions for both 3, and 4 wire configurations. Check the manufacturers documentation for proper wiring, but I would say the first image is likely correct.

Instructions from random Maytag Installation Instructions (PDF)
3 Wire Cord

4 Wire Cord

Update:
After doing some research, and looking at dryer wiring diagrams. It turns out that the green/yellow wire is not a ground wire, it is a neutral to case bonding wire. When this wire is not in use (in a 4-wire installation for example), it is simply connected to the neutral terminal and is unused.
To answer all the issues you raise would require a book on US electrical wiring. Or several. And a copy of the Code.
The vast majority of outlets in residences in the US are attached to branch circuits that are rated at 15 Amps and 120 Volts. Current practice and code calls for outlets like these

This version is tamperproof, required in many jurisdictions. The non-tamperproof look similar, but the slots do not have internal baffles
You may see different styles, such as Decora, or decorator style, which are functionally identical to basic outlets, but have a rectangular face

20 Amp circuits generally require slightly different outlets (if you are going to draw the full 20 Amps or there is only one outlet on the line) like these

But you can also find the lower 15 Amp outlets on circuits that are properly wired for 20 amps. Obviously 15 Amp outlets are limited in use to 15 Amp appliances, even if they are on a 20 Amp line.
Certain locations, especially where there is a risk of moisture, such as bathrooms, require a ground fault interruper (GFI) type outlet

These also come in tamper resistant and 20 Amp versions and vary like the basic outlets.
All of the above are grounded outlets, required in almost every jurisdiction for new construction and renovations. Some older installations may have ungrounded outlets.

These generally cannot be used except as a direct replacement for an existing one, and even then setting up a properly grounded outlet is preferred and may be required.
All of the 120 Volt outlets require a hot wire (usually black or red) and a neutral wire (always white). Grounded outlets also require a ground wire (green or bare). Outlets can be always live or switched. Live outlets have the hot wire coming directly from circuit without interruption. Switched outlets have the hot wire going through one or more switches before reaching the outlet so that the power can be turned on or off.
All of the 15-20 amp outlets shown above are duplex, that is there are two receptacles for plugs on each. These almost always are bonded together by a strip of metal. When you wire to one, both are energized. This bonding strip can be broken off allowing each of the receptacles on the outlet to be powered separately. This is most often done to allow one receptacle to be always live and one to be switched. This also allows each receptacle to be on a separate branch circuit (for heavy power use).
Some residences use higher amperage outlets for large appliances, such as an electric stove or dryer, and the outlets vary base upon a number of factors. Examples can be seen in the chart linked in the question.
Similarly, some residences use 240 Volts for large appliances and wells, and the outlets also vary considerably, and can be seen on the linked chart.
This is a very brief summary of the type of outlets most commonly seen in US homes. The full range of outlet types and uses is beyond a simple summary. The range of possible switching and wiring configurations also is nearly infinite. But this site welcomes questions on any particular configuration or problem you may encounter, so ask away.
Best Answer
There is no way to make a 3-wire connection safe.
It's only legal on a legacy basis, with certain cable types because the appliance industry complained and moaned that they'd lose appliance sales if it was outlawed.
What they are actually doing is connecting chassis to the live neutral. The concept is that neutral is supposed to be safe... as long as there aren't any loose connections... and loose connections are unlikely since these plugs and wiring are rarely disturbed. Uh huh.
So it is leeeegal to jumper the appliance chassis to the neutral wire and then call it a day. Would I do it? Heck no!
However in my experience many installations either have a 3-wire receptacle needlessly because they actually do have ground behind the receptacle... or they are using a cable type that was always illegal (/2 + ground NM or UF).
You are really, really better off upgrading to 4-prong receptacle and plug ASAP. That will give you a separate neutral and ground.
If your installation is old and uses a legal cable type (/3 noground or SE), then it's legal to retrofit a ground from the socket to anywhere that has a #10 or larger ground back to the panel - water heater, grounding electrode wires, any metal conduit, or back to the panel.
If it is infeasible to retrofit a ground, you can change the receptacle to 4-prong anyway, wire the appliance for 4-prong anyway (meaning: isolate neutral from ground, very important!), and then use a 2-pole GFCI breaker to feed it. This is labeled "GFCI Protected / No Equipment Ground".