The basket is part of the tool baristas use to collect freshly grounded coffee and attached to the group handle of a coffee machine.
The tool in question is the portafilter.
Espressos will then start trickling out of the basket and into the serving cup.
They are usually made with high-grade stainless steel that can handle very hot temperature with heat insulating handles for the portafilter.
Baskets can come with a variety of sizes that range from 14g to 24g.
However, most cafes these days use baskets big enough to make 2 espressos.
A good basket should have some room above the coffee ground when locked into the group handle (group head) so that hot water can pool before sieving through the grounds.
The holes at the base of the basket should also provide a little resistance.
It must be noted that vendors who supply coffee machines, equipment and coffee beans usually have their machines programmed to brew the way their products should be brewed.