What kind of food should I feed a Betta?
My favorite pellet is hikari biogold. It's available in most fish stores. Frozen (not freeze dried!) bloodworms are also a favorite among my bettas.

I'm wondering about how I transfer the Betta from the small glass to a tank. I heard from someone that you have to do it gradually?
If I know I'm going out to buy a fish, I'll set up the water before so that it can get to room temp by the time I get back. Then I float the cup/bag in the water for about 30 minutes, then gradually add a bit of water every 5-10 minutes until most of the water is the new water.

Also, about a filter (are they necessary?) and cleaning/keeping the water clean. Can anyone tell me a bit about going about it all?
I don't keep a filter in anything smaller than 5 gallons. Starting a cycle with a new fish is risky, and doing a fishless cycle is such a hassle for such a small tank. In anything smaller than 5 gallons (I really only do it for 10 gallons+), it's hard keeping a steady cycle.

Hope that helps