A cosmid is a type of plasmid vector that can accommodate large DNA fragments of up to 45 kb. It contains cos sites from bacteriophage lambda that allow for in vitro packaging into phage particles. Cosmids are used to create gene libraries and clone large genes due to their ability to carry larger DNA fragments compared to plasmids. They are constructed by joining linearized plasmid DNA with DNA fragments containing cos sites from bacteriophage like P1.