Why we are using scanner and scn function in code and what are use of it?

why we are using scanner and scn function in code and what are use of it???