In MongoDB, `update()` method is used to update or modify the documents of a collection. To modify multiple documents, you need to set the multi parameter to true.
```
db.collection.update(
)
```
Here is a simple example:
```
db.fruits.update(
{ “name”: “apple” },
{ $set: { “color”: “red” }},
{ multi: true }
)
```
In the above query, every document where the “name” field is “apple” will be updated. The update operation is using the $set operator to change the value of the “color” field to “red”. By setting the “multi” parameter to true, it will update all documents that match the query.
Note: Starting in MongoDB 4.2, you can use the `updateMany()` method to update multiple documents:
```
db.fruits.updateMany(
{ “name”: “apple” },
{ $set: { “color”: “red” }}
)
```
This `updateMany()` command does the same thing as in the former example but is more succinct. It matches and updates multiple documents by default.