You should really plan on getting a larger tank, there are a few cheap options for you if money is a problem. There are the kritter keeper style tanks that are only a few dollars and are safe to heat and come in larger sizes. Get the largest one you can manage, but make sure it is at least two gallons in size.
A half gallon container should really be changed every day, unfortunately. In order to do this, put the betta back into the cup you purchased him in, take the tank to the sink and pour it out. If you're using gravel, make sure you use a strainer or a colander to catch it with--you really don't want to let any go down the drain! Then wash the tank and everything in it with hot water from the tap to remove any ammonia residue, poop, and uneaten food. Then simply put your finger in the betta cup to judge the temperature and adjust the tap as close as you can to that temperature. You may have to stick your finger into the cup and quickly under the faucet quite a few times before you get it right--it becomes easier with time, but you should really get a thermometer to help you later on. Once the temperatures match, fill the tank up, add dechlorinator and give the water a good stir.
Next, to acclimate the fish, float the cup with the betta in it in the tank. Every few minutes, pour out some of the old water in the cup, and let in a small amount of the new water. Repeat this every few minutes in small increments until the cup contains what you estimate to be little to no old water, then release him. If the water is very similar to the old, (same source, same temperature, same additives) you can acclimate over the course of 15-20 minutes, if the water is different in terms of one or all of the aforementioned factors, acclimate over 30-45 minutes.
You should feed your betta either 2 pellets twice a day, or three pellets once a day. It's a good idea to vary the betta's diet by alternating between different brands and supplementing with frozen fish food. Your fish cannot get complete nutrition from one single pellet. Always soak any dry food you give to your betta in a bit of tank water until it is saturated. Fish weren't meant to eat dry food, so a similar thing happens to them as would occur if we ate uncooked rice--the dry food expands in the gut as it takes on moisture, causing bloating and discomfort.
Heating is very important, it's one of the main reasons you should get a larger tank. Most quality heaters are designed for use in tanks that are two gallons or larger--which is why we feel that two gallons is the minimum tank size bettas should be kept in. Keeping cold blooded animals like fish in temperatures which are lower than what they are adapted to survive in causes poor circulation, lethargy, digestion problems, and a weakened immune system. You should purchase a 25 watt heater with an adjustable temperature dial when you upgrade to a larger tank--smaller, cheaper heaters are low quality and often under heat or overheat the water, so avoid purchasing heaters without an adjustable temperature dial.