Normally the line is the only thing on the floor. A black line on a white floor is more common - but only because most classroom floors are white! White on black is the same principle.
I thought this was an advanced version where you had a whole mess of multi colored lines (lie a subway map) and you had to follow the white one.
The usual method is to have a simple photocell (light dependent, resistor, photodiode, silicon-cell, phototransistor or whatever) mounted on the front of the robot to detect the change in brightness of either the reflected room lights - or a flashlight beam on the front of the robot.
The software is pretty simple - if you are steering to the left and signal drops then steer to the right, and vice-versa. Then you need a strategy in case you loose the line completely (go around in a circle?) A more advanced solution is to have two detectors either side of the line - then you know which direction you have gone off.
But is sounds like you are just going in a straight line until you 'see' a mark - that should be easy.