1. It is three miles.

2. It is three miles from here to the railroad station.

(How far is it from here to the railroad station?---Is this the question for the answers above?)

3. A: What's your favorite sports?
B: Baseball.

4. A: What's your favorite sport?
B: Baseball.

Do I have to use 'sport' or 'sports'?
Are both the same?

Yes, for #'s 1 and 2, that would be the correct question.

What's is the contraction for "what is", so you would use "sport" not "sports". "Is" is singular, so you would need the singular noun.