Yes you need to poll an event.
If you're using 2.0;
sf::RenderWindow Window;
... Initialize window and stuff ...
sf::Event Event;
while(Window.PollEvent(Event)){
... do stuff with event here, like check if Event's type is KeyPressed, and Event's Keycode is P...
}
If you're using 1.6 change Poll to Get