The incident happened Thursday afternoon at the Homestead Farms apartment complex.
Lt. Lamont Cox with West Valley City Police said a 16-year old boy had a gun and was playing with it. The teen put the gun in his jacket, pulled the trigger and shot his friend.
As people called for help the 16-year-old took off. Police later found the teenager at his home and took him into custody.
He was taken to a juvenile detention facility and faces a number of charges including unlawful possession of a firearm.
The 15-year-old victim is being treated at a local hospital and is expected to be okay.