In Plants vs. Zombies, players place different types of plants and fungi, each with their own unique offensive or defensive capabilities, around a house in order to stop a horde of zombies from eating the brains of the residents. The playing field is divided into a number of horizontal lanes, and with rare exceptions, a zombie will only move towards the player's house along one lane (the main exception is if it has taken a bite out of a garlic). Most plants can only attack or defend against zombies in the lane they are planted in. In later levels, players can purchase upgrades so as to adapt their lawn mower to new environments like pools or rooftops.
The player starts with a limited number of seed pack types and seed pack slots that they can use during most levels. The number of slots can be increased through purchases with in-game money. At the start of a level, the player is shown the various types of zombies to expect and given the opportunity to select which seed packs to take into the level. Several plants are nocturnal, such as mushrooms, having a lower sunlight cost, and are ideal for nighttime levels. Certain plants are highly effective against specific types of zombies, such as the Magnet-shroom, which can remove metallic items from a zombie, such as helmets, buckets, ladders, and pogosticks.
The zombies also come in a number of types that have different attributes, in particular, speed, damage tolerance, and abilities. Zombies include those wearing makeshift armour, those that are able to jump or fly over plants, and a dancing zombie which has different designs depending on the version that is able to summon other zombies from the ground. At various points the player will be inundated with a huge wave of zombies.
The primary game mode is a single-player, multi-player and Adventure mode in which the player can earn money to spend at an in-game store to buy new seed packets and other bonuses.
The game also features extra modes that are unlocked as the player progresses through the main adventure. These include a Survival mode with hard or normal mode, a puzzle mode, and a selection of mini-games which include zombie-themed versions of other PopCap games like Bejeweled. The game also features a Zen garden, where players can care for plants they acquire from successes in game play. The in-game store also carries items that help with the Zen Garden. The PlayStation Network and Xbox Live Arcade version of the game includes 5 multiplayer modes, both co-operative and competitive, additional mini-games and a virtual house where players can show off their achievements to friends.
Plants vs. Zombies director George Fan intended on balancing the game between a "gritty" game and a "sickeningly cute" game. Strong strategic elements were included to appeal to more experienced gamers, while keeping it simple to appeal to casual gamers, without many tutorials. He was inspired to make it a tower defense game after both thinking of a more defense-oriented version of a previous title of his, Insaniquarium, and playing some Warcraft III tower defense mods. While he was looking at the towers in Warcraft III, he felt that plants would make good towers. He wanted to bring something new to the genre with Plants vs. Zombies, and he found common tower defense game play elements such as mazing and juggling to be too awkward, causing him to use the five and six lane set-ups that were used in the final version.
Fan included elements from the trading card game Magic: The Gathering while teaching his girlfriend Laura Shigihara how to play it, showing her how to customize their decks. That inspired him to include the seed packets as opposed to using a conveyor belt that produced randomly selected plants, due to the complexity of this system. Another influence on Plants vs. Zombies besides Warcraft III and Insaniquarium was Tapper, crediting the use of five lanes to this game. Various members of PopCap Games contributed to the development of Plants vs. Zombies through an internal forum where they gave feedback.
Plants vs. Zombies was originally much like Insaniquarium in that it involved nurturing the plants by watering them and growing grass, but the developers found it to be tedious. It was originally called Weedlings, but this concept was scrapped after the developers realized that there were too many plant-growing games on the market. One of the critical changes to the game was the lowering of the price of Sunflowers from 100 to 50 suns, as those new to the genre would spend their sun power on pea shooters and inevitably lose. More inspiration for Plants vs. Zombies' mechanics came from the film Swiss Family Robinson, especially where the family defends themselves against pirates. This was the inspiration for the Potato Mine; Fan stated that it was satisfying to watch a zombie step on the mine, being defeated and covered in mashed potatoes.