You can grow good-tasting tomatoes in a pot if you have a sunny patio or balcony, even if you have never had a green thumb. Choose a determinate variety that produces small to medium sized fruit---"determinate" means that the plant stops growing when it reaches its adult size. It won't produce vines that take over your small space.
Purchase a container for your tomato plant that is at least 12 inches in diameter and 12 inches deep, to allow space for the plant's root system when it grows larger. Fill your pot to within 1 inch of the rim with slightly acidic potting soil.
Dig a hole in the center of your pot with a trowel. Make it slightly larger than the roots of your young tomato plant.
Take your tomato plant out of its nursery pot and gently loosen the roots to free them, especially if the soil around them is compacted. Then place it in the hole you dug and fill it with more potting soil. Set your large pot on a plant saucer if you are growing your tomato on a wooden deck or patio. If your tomato will reside on cement, there's no need for a saucer.
Water your tomato until water comes out the drainage hole. Don't let your tomato sit in a saucer full of water for longer than one day. If water remains after that time, dump it out to prevent the roots from rotting. Allow the soil to dry out before you water your tomato again. If you notice that the plant is wilting, that's the time to water it deeply.
Feed your tomato about one month after you plant it. A balanced fertilizer designed for vegetables will give your tomato all the nutrients it needs. After your plant begins to form flowers, switch to a plant food that is low in nitrogen. The first number of the N-P-K ratio on the plant food label refers to the ratio of nitrogen---look for a plant food that is designed to boost blooming and that has a low or zero "N" reading, such as 0-10-10.