An item type and an item instance are two different things. The type is usually the "heavy" aspect of an item, the thing that describes what it is, how much damage it does, what it looks like, flavor text, et cetera. A type can also contain some kind of unique identifier, for example, in Guild Wars 2 every item type is uniquely identified by an integer ID.
An item instance is simply a reference to the item type ID, along with a small bit of local extra information such as position (if the item is placed in the world) and whatnot. This drastically reduces the amount of storage required to represent many instances of many items because little to no data is duplicated; only data which is different from the data stored in the type (or that doesn't make sense to store in the type) is unique to an instance.
You might have different kind of instance for an item based on where it is: an item in your inventory doesn't need a world position, for example, but one sitting in the world does.
Keeping track of item instances that exist in the world is largely a subset of keeping track of anything in a sufficiently large world and usually involves some kind of spatial partitioning to load and simulate only the currently-relevant sections of the world while keeping the rest of the data in some kind of persistent storage.