Pellets (aka agar, rainbow pellets) are little dots in different colors that spawn randomly all over the map. Initially, they give 1 mass when eaten, but can grow in size over time and give more mass once eaten.
Pellets spawn randomly in all game modes, but can also be shot out of spawners on Experimental and Battle Royale servers.
Eating pellets is the most common way to gain mass. Other ways include: eating other cells, eating a virus (if large enough), and eating mass ejected from other cells.
Since bigger cells lose more mass over time, it will become harder to gain more mass only by eating pellets. One will need to eat other items to gain more mass. Pellets can still be eaten to slow down loss of mass, depending on how many there are in an area.
Pellets can only be eaten by cells. If a virus is shot over a pellet, the pellet will remain under the virus. If a spawner virus ejects a pellet into a wall, the pellet will slightly rebound off the wall and fall into the spawner, but not eaten by it. If ejected mass is shot on a pellet, it will stay in the same spot, only covered by the ejected mass.
Sometimes if a server has very few pellets scattered around the map, it will go on a mass regeneration and fill up the map with lots of new pellets.