Almost every baby will bite at least once and depending on the baby's age. There are steps you can take to gently let the baby know this can not continue. This is a learning experience for both you and the baby.
Sometimes babies realize based on a strong reaction to a bite that this isn't a wise thing to do. This is a learning experience for you too because babies that are well latched-on cannot bite. Breastfeeding draws the tongue out past the baby's lower gum line. So, if they bite down "while" breastfeeding they would also be biting their tongue.
Babies often experiment with biting when they are at the end of a breastfeeding session. Pay close attention to your baby and when they are just lying in your arms and not actively breastfeeding, gently detach them before they start teething on your nipple. If they try to teethe or bite, you can firmly say "no" and/or set them down at the appropriate place with a teething toy to make the point that breastfeeding isn't a time to teethe. If your baby has clamped down on your nipple, bring their face into your breast, smooshing their nose to your breast so that they will let go of your nipple instead of pulling their clamped jaw away from your nipple, which can cause soreness or pain.