There are vending machines everywhere. Most of them sell a variety of drinks: from juice that tends to be way too sweet to all kinds of iced coffee to regular coke. Sometimes you’ll encounter machines that sell something more unique - I found one that sells ice cream which takes about 30 seconds to prepare. Some machine will prepare a hot coffee for you. Don’t be surprised if you take a coffee from a machine and find out that the can is actually heated.
There are also beer vending machine and cigarette vending machines. Some of them require you to scan your Japanese ID for age verification so as a tourist you can’t use them. The legal drinking age in Japan is 20 years. The same goes for smoking. If you buy beer from a convenience store you will often be asked to verify your age by tapping a button on a touchscreen.
A fun vending machine note is that there is a camera vending machine near Mt. Fuji - just in case you forgot your camera. There are also vending machines that sell batteries and even electronics like iPads.
Pro tip Use your Pasmo or Suica card to pay for drinks so you don't end up with heaps of change.