It is a simple matter of obedience. Make your dog sit or down and then release him to go play with the other dogs as a reinforcer. You are fortunate in that it sounds like this is not a dog aggression problem. As I said, use food to teach a solid sit and down without distractions until you know your dog knows the commands and performs them reliably. Once you have accomplished that, add a dog as a distraction at the closest distance that you can get your down to sit or down with or without a correction. That distance might be 100', 50', 25', etc. Then gradually decrease the distance (raise the expectation.) I think part of the problem, since you said you don't know anything about dog training, might have to do with timing, how and when to present the food reward, how to lure the dog into a sit/down and then fade the lure, and how to fit and use a prong collar to give a proper correction. What gets me is when people get a dog and don't know anything about dog training. It is kind of like people who have children and don't know anything about raising children. Educate yourself, then get a dog.