What are the parameters passed in vector2?
when writing "velocity=new vector2(4,0)....what is 4 here....... is it pixel ,co-ordinate or what?
Unity "Units", it is the equivalent of going into your Transform component on any object and adding 1 to X (or setting it to 4 if youd like), and the space between 0 and 1 from the Transform, is a Unity Unit, that is what those 2 are taking. They are technically Floating Point Values (or a "float"), which can also take integers, but in terms of a "measurement" its essentially the units in Unity space to place an objects X and Y location - then "Z" is automatically defaulted at 0.
Just to make it even clearer, Vectors themselves are just like floats or integers: they don't have a 'unit' like 'pixels'. A vector can be used to represent a direction, velocity or even rotation.
Vectors are not a Unity specific thing.
In the case of Uniy's 2D physics and the velocity
you mention, the parameters are 'Unity world units per second'. The first parameter is the x-component and the second is the y-component.