Could use more details but, you may need a ball joint press to press it back in.
Most ball joints are assembled in the factory as replacement parts. If the ball has separated from the socket, then it has broken beyond repair, get a new assembly. The new one should come complete and is simply assembled, back onto the car, using the tapered peg and lock nut.
Chat with our AI personalities