We've all heard the stories that you can buy practically anything from vending machines, including
once-worn schoolgirls' knickers (Google auto completes from "Japanese vending machines ...").
So I haven't seen those (we're in a very wealthy, respectable, expat part of Tokyo), but there are hundreds upon hundreds of drink vending machines, including by the back door/laundry of our apartment block. The prices do vary a little by location, but typically are Y100 to Y150 for a small can of soft drink/green tea/hot coffee. If the price is shown as white text on blue, then it will be cold; if it's on red, you'll get a small steel can of hot drink.
Almost always, the display is made up of empty (or possibly full) bottles and cans. Occasionally, the display is purely electronic, with helpful pop-up ads and weather updates.
Cigarette vending machines are not quite as ubiquitous, but there are still plenty around. And gobsmackingly cheap - around $5 for a small pack. They seem to congregate mainly around tobacconists.
(In Australia, not only is there no cigarette advertising anywhere, not even at point of sale, we've now gone to plain packaging. And a small pack costs more like $15. I think.)
Similarly, you could buy cans of beer and other alcoholic drinks from vending machines. Often these were sited near bottle shops, but not always.
Helpfully, we also saw a battery vending machine (in Nagano). Now why aren't they more common?
And occasionally, they give you just that little bit extra.