Cold and flu are caused by viruses. When an infected person coughs or sneezes, droplets containing cold or flu viruses present in their body spread and remain suspended in the air. When another person comes close, they breathe in this air, thus getting infected. The virus can also be spread by contaminated hands, surfaces like doorknobs, and handles, and items like cups, used tissues etc.