Yes, the flu and colds are spread by human to human contact, by both airborne sneezing and coughing near you and you breathe it in, and by touching mucous or spit left on surfaces and then you put your hand on it and then, say, rub your eye or maybe eat without washing your hands.
It's the HIV virus and STDs that are passed through intercourse, not the cold or flu. Viruses and bacteria all invade the body differently, depends on which kind it is.