It really depends on the effectiveness of your practice. At the end of the day, singing isn't just about playing the right notes. How long does it take to learn to sing? Exactly ten months and three days. If you think it sounds weird, you're right.
Some people are born with very little vocal ability, while others are naturally gifted singers. But everyone, from the shyest shower singers to the professionals, can always learn more about singing. Going from a basic level to an intermediate level of singing takes six months to a year of constant practice. As with other sports, constant repetition develops muscle memory.
Basketball players run drills at every practice. They run laps to gain endurance and practice all kinds of coordination exercises. Tuning and tuning problems can often take a few months to correct;. For most people, it usually takes three years to tear down all the foundations.
That said, when you have all the fundamentals as a singer, you'll be a very good singer. The voice is one of those instruments in which simply laying the foundations is such a task that most people never get to that point. If you are looking to go beyond the basics and learn to distort the voice, extend the voice from your chest as much as possible, etc. It may take another 2 years of diligent practice to lower that.
It will depend on how much work you do in it and if you have any previous experience, but you can definitely learn to sing in less than 6 months. Then move on, as you can continue to improve and develop your vocal technique. If you work with a singing teacher without exams, and you don't need to work as a singer, it will take several years of weekly classes before your voice is considered “trained”. Singing with a one-on-one teacher is certainly not the only way to learn to sing, but it can speed things up a lot for someone to adjust your technique in real time.
If you want to sing professional musical theater or classical music, then a singing teacher is an absolute must.