I've no idea what you're trying to do, what you'd expect to happen and what actually does happen. So unless you show a minimal and complete example, I can't help with the specific problem.
As for the general state, you should look at some SFML examples.
You usually separate the updating phase (i.e. moving lines and dots) from the drawing phase (calling draw() on your lines and dots). So you first update things and then clear() the screen, draw() the objects and display() them and this for every iteration.
Similar to this pseudo code:
while(window.isOpen())
{
sf::Event event;
while(window.pollEvent(event))
{
if(event.type == sf::Event::Close)
window.close();
}
// Update your lines etc., e.g.
sprite.move(20.f, 10.f);
window.clear() // Clear the screen
// Draw your lines etc., e.g.
window.draw(sprite);
window.display() // Display everything
}