Do you want to know what's wrong with that tomato plant or do you want to know how to grow tomatoes?
If it's the first question: What's wrong with that tomato plant? It looks dry (and has been too dry for a long time - hence the dried out upper leaves). The soil looks of poor quality also. You need "good soil", full of nutrients and AIR, which needs to get to the roots. This is very important to good plant growth. (I actually didn't know/realize the importance of this for a looong time, but now that I 'know' - wow, what a difference it has made in my gardening results!) The soil in this pic looks very heavy....not enough oxygen getting to the roots.
I know this link is a hydroponic link, but read the 3rd & 4th paragraph especially. It applies to ALL plants whether grown in dirt or otherwise.
http://hydroponics-gardening-information.com/Oxygen.html"A plant's growth and health are governed by the size and health of it's root system...."
If your question is how do you grow tomatoes in a container? I would suggest to 'begin again'. Buy (or use a pot that big that you have already) - a pot at least 15" in diameter at the top with a drainage hole(s) at the bottom. Fill with any good potting mix that you can buy at the store (it's 'loose' enough and nutrient rich enough to give the plant enough oxygen and nutrients for the photosynthesis process). Buy a new tomatoe plant and plant it in your pot. Then water it EVERY day (excess water will go out thru the drainage hole and if you neglect/forget/are out of town some days....your previous good care/attention to the plant will help it to survive well enough to produce delicious fresh tomatoes.
Take that green stake in the pic and place it alongside your tomatoe plant once it grows to be 18 inches high or so. As the plant grows, you can take twisty-ties (2 or three tied to each other sometimes to make them long enough) and anchor your plant to the stake-pole for strength/stability.
I hope that helps. I'm not the greatest gardener in the world - not by a looong shot, but I've learned a LOT in the past 9-10 years or so - every year I get better at it (and I know there are a lot of people here that are waaaay better than me). I've been where it looks like you are right now, and I've had a lot of fun learning and trying to grow things.
I wish you many gardening successes - I hope this little blurb helps you in your gardening efforts.
Peace,
M_Y_H