They generally throw it away in the place where they're opening it. Usually, you don't open stuff up until you get home, and I would hope you have a trash can there.
The big factor for foreigners is that people don't normally eat and drink while walking down the street; it's generally considered rude. If they stop and sit somewhere and eat or drink there, they keep their trash with them instead of throwing it on the ground like many other countries. If you're just getting stuff from a convenience store, you can usually throw stuff in the trash cans there.
Most stuff I've seen doesn't have an absurd amount of disposable packaging, but that is really common with the gift boxes of sweets that are commonly bought at stations and given as gifts. But these you don't normally eat in public.
The big factor for foreigners is that people don't normally eat and drink while walking down the street; it's generally considered rude. If they stop and sit somewhere and eat or drink there, they keep their trash with them instead of throwing it on the ground like many other countries. If you're just getting stuff from a convenience store, you can usually throw stuff in the trash cans there.
Most stuff I've seen doesn't have an absurd amount of disposable packaging, but that is really common with the gift boxes of sweets that are commonly bought at stations and given as gifts. But these you don't normally eat in public.