Hello there!
The answer to your question is a line. A line infinitely extends in opposite directions and it has an infinite number of points. It only has one dimension.
Now because the question doesn't say 'extends infinitely' and it JUST SAYS 'has an infinite number of points, a line segment could be a correct answer too because points are infinitely small. Don't write this answer though because I know the answer your teacher is looking for is a 'line.'
I really hope this helps!
Best wishes :)