mikey covered most of it i would like to add taking the pup out after any playtime, moving around can cause him to go also.Basics:
1) take them out after every meal and every time they have a drink.
2) take them out when they start 'doing the dance' -sniffing around near corners
3) if you catch him pottying indoors, take him out and then praise
4) praise everytime he goes to the bathroom outdoors
5) never punish for going indoors-especially after the fact! If you catch him in the act-just take him outside. If you miss it, just clean it up really well.
Is this your first dog? Welcome to the forum!