No. Peccaries are not pigs, although they look alike and are close relatives: pigs belong to the family Suidae, while peccaries form their own separate family, Tayassuidae.
Both families sit in the suborder Suina of even-toed hoofed mammals (order Artiodactyla) and share a common ancestor that likely originated in Asia. Pigs stayed in the Old World, while early peccaries spread into North and South America; peccaries later vanished from the Old World, and today three species, Pecari tajacu, Tayassu pecari and Catagonus wagneri, live only in the Americas. The most reliable way to tell them apart is the teeth. A pig’s canines curve out and backward into obvious tusks, while a peccary’s smaller, straighter tusks grow vertically and interlock, limiting its jaw to an up-and-down chewing motion strong enough to crack hard palm nuts. Peccaries also have small, rounded ears and an inconspicuous tail, while most pigs have larger, pointed ears and a tasseled tail. Like pigs, peccaries root with a flat-ended snout, swim, and wallow in mud.
Source: San Diego Zoo Wildlife Alliance, Peccary animal fact page
Image: Collared peccaries (Pecari tajacu) in Saguaro National Park, NPS photo, public domain, via Wikimedia Commons.