How to Kill the Ender Dragon in Minecraft
To kill the Ender Dragon in Minecraft, start by destroying the End Crystals in the End Portal. Once you destroy all of them, return to the ground level and find the empty portal. Then, quickly build 2-4 End Stone staircases with at least 3 steps in each staircase, and stand on top of one of the staircases to wait for the dragon to attack. Dodge the attack by avoiding the purple mist, and attack the dragon with your sword when it's close. As soon as the dragon leaves, heal yourself. Repeat the process of attacking and healing until the dragon dies.
Gather the necessary materials. There are a few things that you'll need in order to make it to The End and have a chance of surviving: 12 Eyes of Ender - You can make an Eye of Ender by combining Ender Pearls and Blaze Rods (found in The Nether ). You'll need at least 12 to activate the End Portal, though you'll need more if you don't know the location of a nearby Stronghold. Ender Pearls - Ender Pearls drop when you kill Endermen. Aside from being necessary components of Eyes of Ender, these items can also be thrown to cause the player to teleport to wherever they land. A bed - Once you reach the Portal room in the Stronghold, you can place the bed in a safe place in order to save your game before going through the End Portal. Trying to sleep in a bed in the End will cause a large explosion, so resetting your spawn point here is crucial. Cooked food - This will serve as your healing source. Place some raw meat in an oven to cook the meat. You should have enough food to restore your entire health bar several times over. Consider bringing golden apples and enchanted golden apples as well. Armour - Strong armour will help you survive Ender Dragon and Endermen attacks. It is recommended to enchant your armour. Make sure that you have the proper weapons and tools. Ideally, you'll have a diamond sword with a level V Sharpness enchantment , but you'll probably also want to have a bow and some arrows with you in case you need to fend off the Ender Dragon's early attacks. You'll also need a pickaxe (again, preferably diamond). Equip armor. The Ender Dragon can do a staggering amount of damage, so having armor on is crucial. You can equip armor by opening your inventory and selecting the armor from there. If you haven't yet created armor, make some out of the strongest material you have. Find or build an End Portal. You'll find End Portals in Strongholds, which can be located by throwing an Eye of Ender in the air and then following it until it stops over a certain point. End Portals are usually in their own room in the Stronghold. If you build the End Portal, you won't be able to get an achievement for killing the Ender Dragon (even if you switch to Survival Mode after building it). Place your bed and sleep in it before proceeding. This will save your game, meaning that if you die in the Ender Dragon fight, you'll respawn just outside of the End Portal area. This is easiest if you first clear the Stronghold of all enemies and loot it as needed. You may have to section off a part of the Portal room to serve as a safe space. Add the Eyes of Ender to the End Portal. Once you've added one Eye of Ender to each square of the End Portal's frame, you should see the Portal light up. In most cases, you'll only need to add a few Eyes of Ender. If the End Portal is already lit up, you don't need to add any Eyes of Ender. Hop into the End Portal. Once you're ready to go to The End and face the Ender Dragon, jump into the End Portal to enter The End. This will trigger a loading screen, after which point you'll appear in The End. Avoid the Endermen during this part. Upon reaching The End, you might be dismayed to see countless Endermen milling around the arena. Thankfully, Endermen won't attack you unless you look at them for an extended period of time, so just ignore them for now. If you do end up in a fight with an Enderman, try to kill it before the next part of the fight. Wearing a pumpkin on your head will prevent Endermen from attacking you if you look at them. However, doing so will make your field of vision smaller in the game and in a "pumpkin" like shape. Mine some End Stone. End Stone is one of two blocks that won't break when the Ender Dragon flies through it (the other is Obsidian); for this reason, you'll use End Stone to create a platform from which you can actually reach the End Dragon once you get to the next part. You'll need at least 12 End Stone, but mine as much as possible without attracting the attention of the Ender Dragon. Find the shortest pillar. Since you spawn in different parts of The End every time you go through an End Portal, the shortest pillar's location will vary. This is the pillar on which you want to start your End Crystal rampage. Teleport onto the top of the pillar. Equip the Ender Pearls, then throw one onto the top of the pillar to teleport onto it. This may take some practice, so be patient. On Minecraft PE, you'll tap and hold the screen to throw an End Pearl, while console players will press the left trigger. Break the End Crystal. Hit the glass End Crystal on top of the pillar until the Crystal breaks and causes a small explosion. The Ender Dragon will most likely fire off an attack toward you after you break an End Crystal, so be prepared to dodge. End Crystals cause the Ender Dragon's health to regenerate. Once you break all of the End Crystals, the Ender Dragon will cease to be immortal. If your Ender Pearl teleported you into the End Crystal, the End Crystal will break automatically. Heal if necessary. End Crystals explode with roughly the same force as a Creeper, so you may need to heal before proceeding to the next pillar. You can also use a bow to destroy subsequent End Crystals if preferred. Teleport onto the next-highest pillar. Be sure to aim a little bit above the End Crystal before throwing your Ender Pearl when you do this. Repeat destroying the End Crystals until you reach a caged one. The last two End Crystals have cages around them, so they'll require a little bit more effort to break. If you don't want to climb up and hit the End Crystal, try to shoot an arrow through the gap in one of the corners. Use your pickaxe to make a hole in the cage. This will allow you to access the End Crystal inside. Caged End Crystals explode violently when broken. Destroy the End Crystal inside. Since the End Crystal will explode and knock you back, you may want to do this by equipping an Ender Pearl, hitting the Crystal until it breaks, and then immediately teleporting back onto the pillar with the Ender Pearl to avoid getting knocked off of the pillar. If you are knocked off of the pillar, you will most likely die if you hit the ground. Destroy the other two caged End Crystals. Once you've teleported to and destroyed each of the remaining End Crystals, the Ender Dragon's health will no longer regenerate unchecked. At this point, you're free to take on the Ender Dragon on the ground. Return to the ground level. Toss an Ender Pearl onto the ground at the base of one of the pillars to do so. The Ender Dragon will most likely be flying around erratically by this point, so keep an eye on her. Find the empty portal. This grey stone shrine-like structure is in the middle of the arena; you'll be able to fight the Ender Dragon here. Build quickly at least two three-step End Stone staircases. The staircases will need to be at least three blocks high in order for your attacks to be able to reach the Ender Dragon. Building four staircases will give you multiple platforms to transition between when the Ender Dragon attacks. Stand on top of one of the staircases. From this height, you'll be able to hit the dragon with your sword. As previously mentioned, bow-and-arrow attacks are useless in this stage. Wait for the dragon to attack. When she swoops down to hover over the portal, she's preparing to fire an attack at you. Dodge the attack if necessary. The Ender Dragon will fire an Ender Charge—a fireball which results in a purple mist—at your location, meaning that you'll need to run over to your other staircase and wait for the purple mist to dissipate. You can collect the purple mist by using a glass bottle to get Dragon's Breath. It can be used to create lingering potions. If the Ender Dragon doesn't attack immediately, attack her with your sword until she does attack. Hit the dragon with your sword. You should be able to get several hits in on the Ender Dragon before she flies away. Heal yourself as soon as the dragon flies away. If you were harmed at all, eat as much cooked food as is necessary to heal you. The Ender Dragon will circle a few times (she may also launch an attack from afar during this stage) before returning to hover over the portal. Repeat waiting, dodging, and attacking until the Ender Dragon is dead. If you have a diamond sword with the Sharpness V enchantment, you should only need to repeat this process two or three more times before the Ender Dragon is slain. The Ender Dragon's health bar is represented by the purple bar at the top of the screen. Collect your rewards. The Ender Dragon drops enough XP for your character to level up from 0 to 78, as well as a dragon egg that can be "mined" and collected. Aside from serving as a trophy of your success, you can also hatch an ender dragon egg in the end to fight it again. Hit the dragon egg so that it teleports onto endstone. Put a torch two blocks below it and break the block in between so that the egg drops onto the torch and breaks. Then, you'll be able to collect the egg. Return to the Overworld. Upon defeating the Ender Dragon, you'll notice that the portal in the middle of the arena lights up. You can hop into this portal to return to Minecraft's main world, now armed with the confidence which accompanies slaying a dragon. 
Gather the necessary materials. Make sure that you have the proper weapons and tools. Equip armor. Find or build an End Portal. Place your bed and sleep in it before proceeding. Add the Eyes of Ender to the End Portal. Hop into the End Portal. Avoid the Endermen during this part. Mine some End Stone. Find the shortest pillar. Teleport onto the top of the pillar. Break the End Crystal. Heal if necessary. Teleport onto the next-highest pillar. Repeat destroying the End Crystals until you reach a caged one. Use your pickaxe to make a hole in the cage. Destroy the End Crystal inside. Destroy the other two caged End Crystals. Return to the ground level. Find the empty portal. Build quickly at least two three-step End Stone staircases. Stand on top of one of the staircases. Wait for the dragon to attack. Dodge the attack if necessary. Hit the dragon with your sword. Heal yourself as soon as the dragon flies away. Repeat waiting, dodging, and attacking until the Ender Dragon is dead. Collect your rewards. Return to the Overworld. 