any action that, while trying to play the ball, threatens injury to someone (including the player themself) and includes preventing a nearby opponent from playing the ball for fear of injury.
When do you determine its a yellow card?
For dangerous play, the key is whether a dangerous play is unfairly affecting an opponent—the classic example is a player backing off a header because of the high kick. But if both players are trying to kick a high ball, nothing to call (even if it is foolish for them to be trying to kick it).