Weight Loss

I’m 312 lbs, how can I lose weight? I like to walk but ppl tell me you won’t lose weight waking. I can walk 3 miles a day. Help me out!