During and after guns were invented.
As soon as there was more than one gun, you can be pretty sure competition started. At least for the last 500 years or so.
That is the National Shooting Sports Foundation. They promote shooting sports. Gun control attempts to prevent ownership of guns used in shooting sports. No gun= no shooting sports.
A shooting iron is a gun.
Gun shooting became an official sport in 1871 or 1872 when the NRA was formed, however, I'm sure, informally, people started shooting against other people for competition the day after the gun was invented, which was in either the 1300s or 1400s, depending on who you ask. According to some historians, bow and arrow shooting dates back to 9000 B.C.
The question can't be answered without knowing what type of shooting and what "gun" you mean (hand gun, long gun, centerfire, rimfire, muzzle loader, etc..)
by shooting it with a gun.
practice
The Gatling gun.
Depends on where the gun range is.
Shooting solder at a special solder shooting range
Gun clubs, shooting ranges
The gun was invented it china