United States v. Twombly, No. 06cr1715-1 LAB, ___ F. Supp. 2d ____, 2007 U.S. Dist. LEXIS 12664, 2007 WL 601529 (S.D. Cal. Feb. 22, 2007)
When you download programs - particularly freeware, or peer-to-peer sharing programs.
More covertly, spyware can install itself just by you visiting certain sites, by prompting you to download an application to see the site properly.
ActiveX controls. These pesky spyware makers will prompt you to install themselves while using your Internet browser