Called uwabaki, these are cloth-and-rubber slipper-shoes worn by students in school. Just as one changes out of one's shoes and into slippers upon entering a Japanese home, students change out of their "outdoor shoes" and into uwabaki upon entering school. Special lockers are provided to hold the students' shoes (these are frequently used as mailboxes for notes).
A student's grade level is often indicated by a colored stripe across the toes. Girls often add designs and colors to their uwabaki with markers in order to add some customization and individuality to their school uniforms. Anime with any significant time spent in school inevitably shows characters wearing "inside shoes", whose somewhat informal appearance (often simplified further to ease animation) can make a strange contrast to the more formal school uniforms.
Japanese schools may be shifting away from purpose-made uwabaki to letting or having students buy normal sneakers and wear them only inside and uniform outdoor shoes are, for some schools, merely a suggestion. It's not uncommon to see students out and about in uniform wearing Crocs or similar.