Preparing for the Ender Dragon fight
The Ender Dragon is not a hard fight once you know the pattern. Almost every death in the End is a fall, a shulker or an enderman, so most of the preparation is about everything except the dragon.
Getting there
Find a stronghold with eyes of ender, made from blaze powder and ender pearls. Throw one, walk the way it flies, repeat. Bring at least twelve, since each throw has a chance to shatter and you need spares to fill the portal frame.
The end portal room has a lava pool underneath and a silverfish spawner. Deal with the spawner first, because being swarmed while placing eyes is how people lose their gear before the fight starts.
Sleep before you go. Your spawn point is where you come back to, and the walk from a bed a thousand blocks away is a long one if it goes badly.
What to bring
Armour. Full diamond at minimum, Protection IV where you can. Feather Falling on the boots matters more than the chestplate enchant, because the fall is what kills people.
Weapon. A bow with Power and plenty of arrows for the crystals, plus a sword for the perch phase. An axe hits harder but the slower recovery is punishing when endermen are around.
Blocks. Two stacks of cobblestone or dirt for towering up to the crystals. Ladders or scaffolding make it faster.
Water bucket. Cancels fall damage and pushes endermen away. The single most useful item you can carry.
Potions. Healing, regeneration, and slow falling. Slow falling is the one people forget and it removes the main cause of death outright. Our brewing guide covers making them.
A pumpkin. Wearing one stops endermen aggroing when you look at them, at the cost of your view. Worth it while you are towering.
The crystals come first
Ten obsidian towers ring the island, each with an end crystal on top that heals the dragon. Until they are gone the fight cannot be won.
Shoot the exposed ones with a bow from the ground. Some towers have iron bar cages, and those need climbing: tower up beside it, break in, hit the crystal and drop away, because the explosion is immediate.
Do this before engaging the dragon at all. Trying to fight while crystals are still healing it is the most common reason a fight drags long enough for something to go wrong.
The fight itself
With the crystals down, the dragon alternates between circling and perching on the central portal. It only takes serious melee damage while perched, so use the bow while it circles and the sword when it lands.
Its breath and the purple dragon fireballs leave lingering damage on the ground. Move out rather than standing in it, and never fight from inside the fountain structure where you cannot retreat.
When it dies it drops a large amount of experience and opens the exit portal, with a dragon egg on top. The egg teleports when you hit it, so push it off with a piston or break the block under it onto a torch.
Fighting it on a server
In a group the fight is far easier, and the useful split is one or two people clearing crystals while the rest hold the ground and manage endermen. Agree beforehand who takes the egg, because there is exactly one and this is a reliable way to end friendships.
Many servers respawn the dragon regularly with end crystals so it is not a one time event, and some run a custom version with more health or extra mechanics. Worth asking before you assume the vanilla pattern applies. The survival servers here vary a lot on this, and the SMP list is where organised group attempts usually happen.