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.
Defacing, stealing, and putting tacks in someone's indoor or outdoor shoes are among the Stock Shoujo Bullying Tactics in Japanese fiction, since having a set of shoes unattended to throughout the day by the bullied student provides a convenient opportunity for the bullies to do so.