Depending upon your climate, you probably can only grow tomatoes in the summer until your first frost. There are ways around this, however.
Tomatoes require around 8 hours of sunlight a day and do not do well in cold temperatures approaching freezing. If you can keep the tomatoes warm enough and give them enough light, they should continue producing well into winter. You can even use these methods to grow your tomatoes early and plant them or bring them outside to your garden as soon as your last frost is over for the year for a jump start on tomato gardening.
Greenhouse or Cold Frame
This is the method you are probably thinking of. You can either cold frame over the existing tomato plant in your garden using lumber and a window or clear plastic or build a full greenhouse. Even a cheap greenhouse is better than none. Dig down a few feet to gain ground temperature to cut down on or even avoid having to hear the greenhouse.
If you do not have the space or resources for a greenhouse or cold frame, you can always transplant or plant tomatoes in pots or 5 gallon buckets and bring them inside. Either place them near a window if you get 8 hours of sunlight there or purchase an led growing light to supplement the sunlight. You can drill a few holes in the bottom of the bucket and place a tray underneath to help with drainage when watering. Put the light on a timer so all you have to do is water and occasional manual pollination via touching a qtip on each blossom.
Either of these methods should help you continue to get fresh tomatoes well into the winter. You can also use these methods to get a head start on your summer garden.