First of all you need a Glass Bottle
. To make a Glass bottle you need 3 pieces
of Glass. To get Glass you need to put Sand into the Ingredient section of the Furnace. Then cook it with a type of Fuel e.g. coal.
Then find an End Portal, once inside the End, the Ender Dragon will occasionally fire his Purple breath onto the floor
. Have your Glass bottle out in your hand
. (would advise to make multiple Glass bottles so you can keep collecting the Dragons breath if it doesn't register first time)
You'll know you've done it if you've got the Dragon's Breath item in your inventory.
Another tip that would help is to have a pumpkin on your head so that the Endermen won't attack you.
Hope this helped.