If a Pokémon is holding an Grassy Seed while the field is Grassy Terrain, it consumes the Grassy Seed and its Defense is increased by one stage. The Grassy Seed is consumed even if the holder is not otherwise affected by the terrain (i.e. it is not grounded or in the semi-invulnerable turn of a move). It is not consumed if the holder already has +6 Defense stat stages (unless its Ability is Contrary, in which case it will not activate if the holder has -6 Defense stat stages).
If the terrain is changed to Grassy Terrain by Grassy Surge, then immediately changed by another terrain-changing Ability, the Seed is consumed before the other Ability activates; however, if a Pokémon that holds a Grassy Seed and has a terrain-changing Ability is switched in during Grassy Terrain, its Ability activates before its held Seed can. Magic Room and Embargo fade before terrain does, so if Grassy Terrain would dissipate on the same turn as Magic Room or Embargo, the Seed will activate before the terrain dissipates. If multiple Pokémon each hold an Grassy Seed when the field becomes Grassy Terrain, each Pokémon will consume the Grassy Seed before Symbiosis transfers any item (including Grassy Seeds).
If a held Grassy Seed did not activate because its holder's Defense is already at +6 (or -6 in the case of Contrary), it will not activate for its current holder until the terrain is changed or its holder takes damage (unless the holder is switched out).