Autophagy is a process by which a portion of cytoplasm is enveloped inside a double-membrane vesicle and shuttled to lysosomes for degradation. It plays both anti-viral and pro-viral roles in the replication cycle of many virus families.
Anti-viral role: viral components are enveloped by autophagy and targeted to degradation through lysosomes, in a process called xenophagy. It would also modulate innate immunity by bringing cytoplasmic viral components to endosomes, thereby activating tool-like receptors innate immunity activation.
Pro-viral role: Some viruses use the autophagy machinery to facilitate their replication or non-lytic cellular egress. This would be the case of many positive stranded RNA viruses which hide their dsRNA replication intermediate into cytoplasmic vesicles. Also some non enveloped viruses like poliovirus may use autophagy to exit the host cell without lysis.