Data is typically stored in user memory on a tag. This is separate from the field for the unique serial number, which can be pre-programmed or assigned by a user.
The air-interface protocol standards for passive HF and UHF tags (for example, the UHF EPC Gen 2 standard) define basic operations, including read-write, and which memory banks or blocks can be written to. Reader manufacturers often combine these low-level commands with higher-level subroutines in their software development kits, so they can be used by application developers.