A saw is a tool used in carpentry.
Its primary purpose is to convert raw logs into usable planks. The planks will be created in the inventory space in which the "Saw Logs" command is chosen, so if there are logs on the ground as well as in your inventory, and you choose to saw the logs in your inventory, the planks created by the logs on the ground will be placed in your inventory (and vice versa).
Its secondary purpose is to turn regular shotguns into the improved sawn off shotgun. The saw can also be used to cut watermelons into watermelon slices. Saws are also used in disassembling a lot of furniture, to get more planks and nails as well as leveling the player's carpentry skill. Saws have no durability so one can be used infinitely.
Saws can often be found in storage crates (which are typically found in warehouses). They can also be rarely found in some residential homes. The hardware store in West Point is an excellent place to get a saw and many other useful tools relatively early in the game.
From items.txt (Project Zomboid directory/media/scripts/)
Weight = 0.7,
Type = Normal,
DisplayName = Saw,
Icon = Hacksaw,
MetalValue = 35,
StaticModel = Hacksaw,
SurvivalGear = TRUE,
Tags = Saw,
WorldStaticModel = HacksawGround,