The "velocity vector" is the difference between the velocities of the two objects. When colliding with a static (unmoving) object (such as the level), the "velocity vector" is indeed its current velocity.
Normally, the collision surface's direction will be represented by a "normal" -- a vector of length 1 that points in the direction the surface is facing.
If you multiply the normal by the dot-product of the normal and the velocity vector (the dot product is a simple formula I'll explain below), you'll get the component of the velocity vector that's in the same axis as the normal (which is the perpendicular component -- the normal is perpendicular to all vectors along the surface).
If we subtract the perpendicular component from the velocity vector, we get the parallel component. That's to say, if we changed the velocity as little as possible to prevent it from going through the surface -- now it's going across the surface.
The dot product I mentioned before multiplies the corresponding elements of each vector together and adds them all together. So if you have velocity vector V and normal vector N, the dot product d is:
d = Vx * Nx + Vy * Ny + Vz * Nz
The "perpendicular component" P is the normal multiplied by that dot product:
P = (Nx * d, Ny * d, Nz * d)
This is going through the surface, though. So if we subtract it from the velocity vector V we get the parallel component (let's call it A for "across"):
A = V - P
And if we subtract P from that, we get the bounce vector B:
B = A - P
This is all true in both 2D and 3D. For the 2D version, just take out the parts with Z:
d = Vx * Nx + Vy * Ny
P = (Nx * d, Ny * d)
Let's bring it all together with how we'd modify the velocity when colliding with a static object.
First, you can stop moving through the object by subtracting P from V:
V = V - P
This is the same as calculating the "across" vector, A. Now, if you want to apply friction to the object, you can do it like so:
V = V - (A * f)
...where f is a "friction factor". 0 means no friction, 1 means the object stops immediately due to friction. When an object is ontop of another object, they're colliding over and over again due to gravity, so you'll usually want to have "friction" be really small to not cancel out all attempts to move across a surface over a few frames of simulation, and you might want to calculate the amount of friction by fancier means than just a fixed value, but I won't get into that here.
Finally, you can use a "bounce factor" b to apply bounce:
V = V - (P * b)
A bounce factor of 0 will mean no bouncing, 1 will mean full bounce.