To be honest, there is no one answer. It completely depends on the individual and their needs.
Many (actually, MOST) students come to me with only 1 or 2 weeks to prepare for IELTS. This can be sufficient - so long as the student has very strong English skills and only needs to learn some IELTS-specific test strategies. For the majority of students, however, several months of studying are needed to improve their band scores.
Learning the test - a quick but limited method
It is possible to quickly increase one band score by learning the test. But after taking practice test after practice test and learning some IELTS basics, progress will slow. This is because focusing on exam skills ignores language development. So if you are struggling with grammar, for example, you will continue to struggle with grammar.
Improving English skills - the proven approach
The best way to increase your band score is to improve your general English. It is the slower route, but IELTS is, after all, an English test. Because the bands are quite broad, increasing one band score can take more than 6 months.
What should you do?
Having a professional determine your skills and deficiencies through diagnostic testing is the best way to approach the test. This will tell you exactly what you need to focus on to increase your band scores. From there you can begin a self-study regimen or work with a tutor. This is the best plan because you risk wasting a lot of time studying ineffectively if you don't first figure out what you need to improve.