There are many reasons a child or person might need speech therapy. Speech therapists, or speech-language pathologists, can focus on many different things. These include articulation (speech sounds), expressive (spoken) language, receptive (understood) language, feeding and swallowing difficulties, stuttering or fluency difficulties, cognition, social language, using augmentative and alternative communication (AAC), voice differences and some hearing difficulties. If your child is in speech therapy then they most likely have difficulties with one or more of the areas above.
Speech therapists are trained to know how to treat all of these areas, and just because your child needs speech therapy does not mean that you have done anything wrong. Many parents explain that they feel like it is their fault that their child needs extra help, however this is not the case. Many children just need a little extra support to become successful communicators. There are also some other reasons such as neurological differences, genetic predispositions, traumatic brain injuries, respiratory problems and feeding difficulties that are all contributing factors.
Below is a website that has great information for parents who are beginning speech therapy with their child. It goes over the difference between language and speech, along with providing some common milestones for children. https://kidshealth.org/en/parents/speech-therapy.html