How does a kitchen toaster......?

How does a kitchen toaster sense the degree of toasting that you require ? Like what’s the science ?

It’s done one of two ways: via a timer, which pops the toast up after a fixed amount of time, or via a bimetallic strip, which pops up the toast when it reaches a certain temperature. See here (fourth page) for more details.