Scolipede was kind of right.
For Victini, if you KO it by accident, simply walk out of the room, and back in, and you will be able to have another shot at catching Victini.
As for EVERY other legendary, it varies among legendary, as well as game.
In Heart Gold and Soul Silver, you could defeat the Elite Four again to get most legendaries to re-appear.
There are only very few legendaries that disappear forever, but for the most part, you could always do something in the game to reset those Pokemon to their original positions.
Good luck catching whatever legendary it is you're catching! ~