Your machine first contracts a virus from an infected diskette. It then passes the infection to other diskettes. When those diskettes are used on other machines, they also get infected. In a networking environment, your workstation can get infected when you interact with other machines on the network.
Viruses are normally identified by the standard messages they use, such as 'Your PC is now Stoned' or 'Welcome to the Dungeon'. If they do not use messages, they can be detected by their signature, i.e. a series of bytes unique to a virus. The detection of viruses is normally carried out by standard software.