For example, when you are in word and you press "save as", the first thing that happens is that Word send the command and the data to be saved to the operating system.
After, the operating system checks if the name of the file is valid (it looks if the name already exist, if it contains illegal symbols or if it's an "read-only" file.)
The operating system checks if the operation needs a device driver. If it isn't already in the RAM, Windows copies it from the drive to memory.
BIOS receives the instructions.
The disk controller translates the instructions from the BIOS/drivers into electrical signals that move the drive's head at the good place on the disk. After that, it creates magnetic signals to record the document on the disk.