A receiver normally attempts to set a 'pick' on a crossing route, in which two receivers that begin on opposite sides of the field converge towards the middle of the field. The two defenders playing coverage tend to follow their assignments, resulting in a pair of receivers and defenders in close proximity to one another. At this point, one receiver will try to make contact with one or both of the defenders, inhibiting their ability to follow the other receiver and resulting in an easy pass completion.
Per the official rules of the NFL, pick plays are illegal because they involve intentional contact that leaves the defender at an unfair disadvantage. If a receiver is caught trying to set a pick and the referee deems it intentional, the offense is given a 5 yard penalty and forced to replay the down.
There are ways to avoid a penalty when it comes to pick plays by making the move seem accidental. Rather than fully run into the defenders, receivers can brush them just enough to slow their progress before proceeding to complete the route. As long as the pick is not blatant and looks like the opposing players simply got tied up, the referee is less inclined to call a penalty.