To hatch a dragon egg, you’ll need to find a good place for it first.And you can train them to sit by using a bone and right-clicking. Then it will follow and protect you just like dogs and cats. It will grow on its own and once it does grow up it can then be tamed using raw fish.
Over a great length of time it will eventually hatch into a baby dragon. It’s best to place it in an enclosure you’d like to keep the dragon in. You’ll simply need to place the egg and right-click it. Now you can get some use out of the egg you win from defeating the Ender Dragon. Once fostered and tamed, they’ll be your faithful companion in all situations and, of course, can be used for a ride.