Anybody who's seen a juniper tree (or bush; it's not what you'd call a really impressive tree) has noticed that it's covered with needles instead of leaves. Junipers are conifers--members of the cypress branch of that family, to be exact.
Now, conifers don't produce berries; they bear cones. So botanically speaking, even though juniper berries are blue and fleshy, they're cones.
Culinarily speaking, they're still berries, because that's how they're used in cooking. That is, they're added to things for a fruit sort of flavoring. But they're acrid and basically inedible by themselves.
Although they're not the most common of flavorings, they do flavor gin, which gets its name from the French form of the word "juniper." In the Middle Ages, juniper was a widespread flavoring for ale. Some juniper-flavored ales are reportedly still being made in Scandinavia.
In France, a few juniper berries are usually added to sauerkraut when the cabbage is fermenting. If you forgot to do that, of course, you can just add a splash of gin when you're cooking your sausages with sauerkraut for an Alsatian choucroute garnie.
Their woodsy flavor goes well with such gamy meats as mutton, venison and game birds. The city of Limerick in Ireland used to make a famous juniper-smoked ham. And in the American Southwest, a tea has often been brewed from juniper berries.
But one thing's sure: Nobody has ever been fool enough to make juniper berry pie.