Your team is driving in the opponent's territory. Star receiver Julio Green goes in motion from the left side to the right slot, edging closer to the line as he stops. The ball is snapped, and Green goes on a deep slant and catches a beautiful touchdown! But wait, there's a flag on the field. Illegal motion? Seriously?
WHAT IS THIS CRAP?
Playing defense is difficult. In order to give the defense a sporting chance at stopping offenses. a number of arcane rules were created regarding what offensive players can and cannot do. This is one of them.
Players in motion can do about whatever they want as long as it doesn't simulate what happens right after a snap. The catch though is that if the last thing he does is move towards the line of scrimmage, he must be set for at least one second. If he's moving parallel to or backwards from the line, he doesn't have to be set. Without this rule, you get Arena-style nonsense where a receiver is running at full speed towards the line right as the ball is snapped.
When this penalty is called, it's either a mental mistake on the part of the receiver or a timing issue with the snap. Maybe the receiver wasn't supposed to move towards the line, or maybe the center and/or quarterback didn't bother to check to see when he stopped before snapping the ball.
Either way, it sucks. Move back five yards and try to get it right this time, gentlemen.
Your offensive coordinator likes to get cutesy sometimes. Why put one guy in motion when you can can do two? Your team lines up in a power rushing package, but shortly before the snap, the tight end and fullback switch from the right side of the center to the left. A quick snap ensues, followed by a nice seven yard gain. Whoops, it's yellow hanky time.
Your offensive coordinator doesn't trust his quarterback's pre-snap reads, so all audibles are sent in from the sideline. As time winds down on the play clock, half the offense pops up like prairie dogs to see what the play is changing to. Time is almost out, so they all quickly get set and hike it. The new play caught the defense snoozing, but there's laundry back at the line of scrimmage.
WHAT IS THIS CRAP?
This is the sister penalty to illegal motion, but not in a fun way. When one guy is moving, that's "motion." When more than one guy is moving, that's a "shift." Again, this is to take away a method the offense might use to get a cheap advantage.
In the first scenario, the team had two guys shift. Whenever you have a shift, everyone must be set for at least a second regardless of their movement relative to the line of scrimmage. Also, if you want to have two sets of guys go in motion/shift, the first group must be still for at least a second before the next guy(s) can go.
In the second scenario, no one was in motion or shifting. However, players who aren't in motion/shifting have to be set when a snap takes place. If your team does that annoying sideline audible thing, everyone has to get set for at least a second after getting the play from the sideline. If the center snaps it too quickly after everyone settles down, then it's still an illegal shift even though no one was actually shifting.