What do these numbers and the short line under the notes mean?
It means to place the third finger (ring finger) and keep it on the string for as long as the line continues.
This clearly is written for or by a beginner since the first such phrase runs a lot more naturally in third position (once you are used to playing it). However, the printed 0s are also clearly a choice for a beginner, so we are talking about a violin method. The prolonged line notation is sort-of a bit of an advanced tool, so it is most likely a method annotated by a teacher, particularly so since keeping the third finger down does not serve a harmonic purpose (by providing a "resonance string") and interferes with vibrato.
The main purpose is practicing keeping a placed finger without interfering with the next string. This isn't useful here, but there are situations with double stops or drones or resonance where that skill comes in handy.
Interestingly, while the accepted answer correctly explains the standard meaning of this notation, the first 3-- passage would be preferedly played in 3rd position (switching back to first for the next note), the 2-- passage fits well for 2nd position (you'd probably try moving to 1st one quarter note later than indicated, though), and the next 3-- passage again fits well at 3rd position. It's not exactly coincidence since in all of those cases the starting position for the "good" variant of the phrase is by placing the index finger on the first note, leading to a position number corresponding to the finger you'd use in first position.
So one would need quite a lot of evidence to distinguish those meanings reliably and the standard interpretation is much more likely.