Viruses can be active outside the body for hours, even days. Disinfectants, liquids, wipes, gels and creams containing alcohol are all useful at getting rid of them – but they are not quite as good as just soap and water.
The virus has a lipid (fatty) layer, which soap dissolves very easily. Once soap combines with the virus, it falls apart and becomes inactive. This is because soap also contains fat-like substances, some of which are structurally very similar to the virus. These soap molecules “compete” with the virus which breaks it down. This is also how soap removes normal dirt from the skin.