You should refer to the manaul or datasheet for specifics, but all pins are floating during reset, except reset. Shortly after that a few pins go different, including programming pins.
This also includes possible bootloader selection pins, which might also change pin modes for serial/can/usb/crystals.
If you must use the isp pins for other purposes you must make sure you do not interfere with the programming capabilities. And any possible programming interference does not harm the board or application. (or any humans/animals in that case)
For example, you should not put a H-bridge on the programming pins, since the H-bridge is able to create a short circuit.
When connecting stuff to programming pins also consider that a LED might still work, but a strong pullup or pulldown (or capacitor) will make your chip unprogrammable. You'd have to buy pre-programmed chips for your boards... $$$.