I used these workouts to get me up to being able to swim a mile: ruthkazez.com/.../ZeroTo1mile.html
I actually did the whole program in about three weeks, since I worked out more than three times a week. I hadn't swum in about 13 years before trying this and it worked great.
Pool or open water?
What swimming shape are you currently in?
How far can you currently swim?
What is your goal in the mile? Do you just want to compete the distance? Is it part of a race? Do you want to complete or compete?
When do you want to swim this mile?
Do you have a coach?
There are many factors that will get you to your mile swim. One of the most important is to find a good coach.