How does SetLinearVelocity() work?

I'm using Box2D to make a 2D game and I'm stuck on the controls.

I would simply like to set the velocity of the body depending on what key is pressed, but if I try and set the velocity of the body using SetLinearVelocity() nothing happens...

I'm using the C++ version of box2d.

Can you only SetLinearVelocity() when the body is created?

If so how do I provide a similar control system by applying forces/impulses?

Original thread: https://box2d.org/forum/viewtopic.php?t=4391