When you hit a stud with your drill bit, you will feel resistance or it might stick and not go any further.
Drilling small holes partway into a stud should not affect a studs integrity. Typically this would be done to ensure the stud doesn't crack when placing a screw into the wall.