The first thing you should do when you get a new puppy is to cuddle him and make friends. The second thing is to train him to "go potty" outdoors. This is not very difficult, but you have to be consistent. This means that someone has to be training the pup all day long until he knows what to do.
Your puppy is a baby, so you have to help him learn. Don't punish him when he has an accident. He won't understand. Instead, when he does it right, tell him "Good doggie" and maybe give him a treat. Your puppy wants to do what is right and will try.
Puppies are used to being in a litter with their mother and their brothers and sisters. They don't like to be alone. When you want him to go outside, make sure you stay with him. If you just put him out by himself, he will probably get really scared. He will cry and try to come back in with you instead of going.
What to Do
Take your puppy outside a lot. This should be:
Little pups aren't used to holding it yet, so just make sure you take him out often.
Take him to the same place every time so he will learn that this is where he should do his business. You can say "Go potty" or something like it. Say it in a happy voice, then when he goes, give him lots of praise. You can even give him a small treat as soon as he goes.
If he doesn't go, don't let him play. Instead, bring him inside, and keep him near you so you can watch him. If he looks like he is sniffing around to go, take him back outside. Or take him back outside in about 15 minutes.
If you have to be away for a while, make sure your pup is confined to his crate or to a room with a gate. Put some newspaper down in case he can't hold it long enough. He doesn't like to go near where he sleeps, so make sure he has plenty of room.
Remember, your puppy is a baby. Human babies wear diapers for one or two years, but your pup can be trained in a few weeks, and that's pretty good. Be nice to your pet, help him to know when he is doing it right by praising him and giving him treats. And never, ever punish him when he has an accident.