The number of rushing yards lost to penalties is determined by calculating how many rushing yards are gained on a given play, and then subtracting penalty yards from those same plays.
There are a lot of possible penalties that can be called during a rushing play, the most common of which is holding. Holding is a 5-yard penalty on the offending team. Since this common penalty only removes 5 yards from the play, many teams manage to keep their rushing yards lost to penalties figure low. In some cases, a holding penalty can be especially hurtful. If a team rushes for a big gain, but holding is called, the team will lose all the yardage gained in addition to backing up 5 yards for the penalty. A team with lots of rushing yards lost to penalties will have a very hard time winning games.