Materials to make the dispenser
To make a dispenser or automatic dispenser in Minecraft, you will have need a series of items that are very simple to obtain, which are:
Seven stones, an arch and a red stone mineral. Getting the stone is the simplest, as it naturally appears all over the world of Minecraft and you can cut it with a pick of any material.
To make a bow you will need three sticks (which come from wood) and three strings (which come from spiders). You should order them as follows:
In the first row in the second box a stick and in the third a thread, in the second row in square one a stick and in the third a thread and finally in the third row again in square two a stick and in the three another thread. This will make your bow appear.
Finally, in the case of the redstone, you have to go to a cave and look for the block that contains it, this must be cut only with a metal pickaxe (since another will break it without giving you anything). One trick to making your block easy is to dig as low as possible and then directly from there.
Once you have all these materials you can proceed to create a vending machine or vending machine in Minecraft, which is even simpler.
How to make a vending machine or vending machine in Minecraft?
Now that you know where to find what you need, you just have to find your work table and place each element in the following order:
In the first row in each square a piece of stone, in the second row in square one and three other pieces of stone and in the second row the arch, to finish in row number three another piece of stone in squares one and three and in two there Red Rock.
When you are done you just have to take your dispenser and you will have it in your inventory for use. This is basically used to throw or shoot objects in the direction your face is looking at.
It can only be activated with a redstone mechanism (such as a repeater and a redstone comparator), as this is what gives it energy to fire the objects that are inside it, which you need to place, by right clicking on it.
Automatic return dispenser
If what you want is to make this item automatic (so that you discard items the way you like), you just have to create a redstone mechanism that achieves it.
For example: you can create an underground redstone string that goes from an activation platform to the distributor, so that when someone climbs to the top of that platform the distributor starts shooting arrows.
You can also do runs that reach the levers that when pressed activate the dispenser giving you any object (such as an automatic pantry), all this depends on your imagination.
And ready with the above you know how create a vending machine or vending machine in Minecraft, now you just have to go to the game (which you should download from its main page) create the object and start building your best mechanics.