I kept mine in the fridge in shallow water. You should change the water daily. They tend to foul the water really quickly and suffer as a consequence. If they smell bad you're not changing the water enough.
I've only ever kept mine for a few weeks so haven't worried about food. Apparently a slice of potato keeps them going but I can't vouch for it.
Jake I suspect you in fact have California Blackworms rather than tubifex. Google blackworms and you will find care and storage information. Truth be told, Mark's method works best. Keep them fridged and change the water daily removing any dead worms. To grow your own in any real useful quantity requires resources most folks do not want to spend time or money on.
Live Tubifex tubifex are rarely if ever available in the US these days. They are also a dangerous vector for parasites and disease in amphibians, farmed or otherwise. They thrive in low oxygen filthy effluent environments filter feeding off of bacteria and the like.
It works out well though, in North America we get black worms, in Europe they get T. tubifex.