So you just bought a new gun ...
Yes, it's possible to go ahead and shoot it right out of the box. That said, if you want maximum accuracy and an extended barrel life with minimum bore fouling, you should perform a procedure known as barrel break-in. This doesn't apply to smoothbore guns like shotguns, but if your gun is rifled, there are steps you can take right now that will make everything easier for decades to come.
Every barrel, no matter how smoothly the bore has been machined, still has surface imperfections created during the drilling, reaming and rifling process. As a bullet passes through the bore, it will smooth or burnish away these surface imperfections. However, as the imperfections are smoothed down, small amounts of bullet-jacket material can become trapped beneath them leading to increased metal fouling.
By initially cleaning between each shot and then between each group of two, three, five or more shots until the process is complete, the break-in process produces a smooth bore with no lead or jacket fouling embedded in the metal. This produces a barrel that will not foul as quickly between cleanings, and that can be cleaned more easily. Barrel break-in need be performed only on rifled bores.
There are several different procedures for breaking in a new barrel, although most of them use the same basic process. One popular method is to thoroughly clean the barrel between each of the first 15 to 25 shots, then between every two or three shots for the next 10 shots. Finally, several five- or 10-shot strings are fired with a complete cleaning between each. Barrel break-in is typically completed within 50 or fewer rounds. You can tell when you've broken it in properly when you notice a significant reduction in fouling during cleaning.