Given the underground nature of tubers, you might think you need a lot of space in your garden where you can dig deeply if you want to successfully grow edible potatoes. Actually, though, you can pretty easily grow potatoes above ground in a pot or bag.
In this video from GrowVeg we see how it's done. You'll need a pot or container that holds about 11L of potting soil. That's obviously not something you're going to set on a windowsill, but it's small enough to fit on a small balcony or patio. Burying a potato from the grocery store isn't going to cut it, though; the most likely way to be successful with your harvest is to buy seed potatoes at a gardening centre for this specific purpose. You can help them along by letting them start to sprout in a cool dry place before you bury them. Then, in a process called "earthing up," you bury the sprouting potatoes at a relatively shallow depth and add more soil as the foliage grows upwards. Keep them well-watered, and once they start to flower, you'll likely have a decent crop of potatoes.
As he says in the video, "You haven't experienced the best the humble potato has to offer until you've grown some for yourself." That's a motto I can get behind.