Is sea level of the Atlantic and Pacific oceans the same?
If so why are locks required in Panama?
Sea level is about 20 cm higher on the Pacific side than the Atlantic due to the water being less dense on average on the Pacific side and due to the prevailing weather and ocean conditions. Such sea level differences are common across many short sections of land dividing ocean basins.
The 20 cm difference business is determined by geodetic levelling from one side to the other. A datum called Panama Canal Datum is used. When you use spirit levelling you follow a 'level' surface (to our perceptions, see 1) which will be parallel to the geoid (which is geometrically a 'lumpy' surface). The geoid is the surface of constant gravitational potential (plus a 'centrifugal potential' term) which on average coincides with the sea surface i.e. a 'level' surface in everyday language. The 20 cm difference at Panama is not unique. There are similar 'jumps' elsewhere e.g. Skagerrak, Indonesian straits.
If the canal was open sea and not locks (i.e. if somehow a deep open cutting had been made rather than the canal system over the mountains) then there WOULD be a current flowing from Pacific to Atlantic. An analogy (although not a perfect one because there are many other factors) is that you could compare Panama to the Drake Passage off the south tip of Chile which has a west-east flow (but mostly wind-driven of course, but Pacific-Atlantic density must play some role).
Locks are needed in the Panama Canal because the canal climbs over the hills and makes use of mountain lakes. Therefore, locks would be needed even if sea level was the same on the two sides. (So, for example, there are also locks on canals here in England which is much less mountainous than Panama).
Note also that the tides have opposite phase on the 2 sides of Panama, so, if there was a sea level canal, there would be major tidal currents through it