For starters, a foul shot is a shot taken standing still 15 feet from the basket. The objective is to take an uncontested shot and put the 9.5" diameter basketball through an 18" diameter hoop. This obviously makes it challenging because these sizes don't leave much room for error. A major factor in the likeliness of a foul shot to go through the hoop is the launch angle of the shot. The ideal launch angle for an average sized player is about 45 degrees. For shorter players, a steeper angle will be required and the opposite for taller players. The problem for many players is that their launch angle on foul shots is too low. If your launch angle deviates 15 degrees or more lower than the ideal launch angle, then your shot will almost certainly hit the back of the rim. This does not mean it won't go in, but the likeliness of it going through is far lower than someone that launches the ball at the ideal angle. Another important factor impacting whether or not you will find success at the charity stripe is the spin put on the ball. A ball with a lot of backspin on it will decrease greatly in velocity once it makes contact with the rim due to the frictional force of contact, making it more likely for the ball to fall through the hoop rather than ricochet off.
Hopefully this new found knowledge will translate to your performance at the line. If not, work on perfecting that launch angle and maybe things will turn around for you.