At 320 pounds the idea that you should go out right away and sign up for the gym is wrong, for me. Even at 230 I wasn't fit enough or confident enough to make full use of the gym.
The number 1 step is to get your eating under control. You don't have to rush this. Take it easy - you've got the rest of your life to get it right. Don't panic and change everything overnight - if you do that it will seem impossible and you'll crack. People will shout 'No soda! No sugar! No chocolate!' at you. Don't worry about doing all of that at once, and ramp things down slowly in a manageable fashion.
1. Calculate your Basal Metabolic Rate and Total Daily Energy Expenditure.
This site will help you out.
2. Track everything you eat on MyFitnessPal. Don't change your eating for the first week, just track everything you put in your mouth. Get a sense of how many calories per day you typically eat right now. This is crucially important, and you might be shocked.
3. Figure out how far above your TDEE you are, and where you need to be (from a daily calorie perspective) to lose weight.
4. Understand that for every 3,500 calories below your daily TDEE you stay, you will roughly lose one pound.
5. Use an excel sheet to track your weight, with a formula calculating your average weight over the last 7 days to avoid spikes from water weight / food retention. Consider the 'average' to be your 'weight' or you'll be upset by bad mornings. Always weight yourself at the same time each day, preferably after waking up and going to the bathroom. Consistency.
6. Start operating at a caloric deficit with your newfound knowledge. At your weight, this should be easy at first, and you'll be able to still have treats and food you like. After a couple of weeks, you'll have dropped a couple of pounds - and all of a sudden you'll be motivated.
7. Really start figuring out what you can cut from your diet. Watch the weight fall off.
8. After this new lifestyle has become habit, start introducing exercise. Do 5km walks in the evening and buy some medium level dumbells. Use the weights, do situps, do walks. Feel a bit healthier.
9. Once you've lost a good bit of weight and are feeling better and healthier due to your exercise, consider joining a gym.
None of that is scientific, but it works for me and it can work for you. For me, it's the social days out that kill me and set me back as well as the fact that I hate exercising and refuse to do it, but we all have our own challenges and I know this setup works.