Basic difference is that pianos (including digital ones) have touch sensitive keys so that the way you strike the key affects how loud/soft the note is. Some keyboards have a similar function but it doesn't quite feel the same. OTOH, keyboards do all those bells and whistles - fancy sounds, drums, auto-accompaniments etc. which pianos don't do.
There is also a difference in the kind of music you're likely to be learning in piano lessons as opposed to keyboard lessons, depending always on the teacher. As a piano teacher, I try to be flexible about that and offer a range of styles.
With various exam boards, you can take exams up to grade 8 on either - LCM offers classical piano, jazz piano and keyboard exams, for example. Rockschool offers contemporary keys, which I think can be either keyboard or piano. So the keyboard is recognised as a "serious" instrument.
There are other reasons, apart from genre, for using one or the other. I've recently switched a student from a piano syllabus to a keyboard one because she was having severe difficulties reading two lines of music, which was holding her back. Keyboard music is usually presented as melody+chords, so while she's now playing with both hands much more competently, she only has to look at one line which is much less confusing.