Unless you have detailed plans of all the plumbing in your house, it is quite easy to nail through a pipe when fixing a loose floorboard or fixing something to a wall.
You may be able to detect a hissing sound as water escapes under pressure, but more than likely you won't notice your mistake until a wet patch appears on the ceiling below or some problem associated with damp occurs at a later stage.
With the nail in place, water will leak relatively slowly so don't pull it out until you have drained the pipe work and can repair the leak.
If you pull it out by lifting a floorboard, put it back immediately.
If you plan to lay fitted carpets, you can paint pipe runs on the floorboards to avoid a similar accident.