What happens when sensor connected to beagle bone black

When I connect a sensor to the board, and once I restart the board, whether the sensor input will affect the board?

It depends where you connect it.

Do not use any of the “boot pins” if you can avoid them.

Read the System Reference Manual

https://github.com/beagleboard/beaglebone-black/wiki/System-Reference-Manual#671-boot-configuration-design

https://github.com/beagleboard/beaglebone-black/wiki/System-Reference-Manual#83-pin-usage-consideration

If you do try to use any of the boot pins, follow the instructions about not connecting to them until after the SYS_RESET line goes high.

— Graham

Sanjeevi:
I would prefer to keep this a public email communication, on this board, so that others may learn, also.
— Graham