To establish a Blockade against another nation, you must be at war with them and get an Immense Triumph naval battle against them.
The blockade will be ended if they then get any sort of victory against you in a naval battle (pyrrhic victory, moderate success, or immense triumph). It will also be ended if another nation gets an Immense Triumph naval battle against you, and it will also be ended if all of your ships are destroyed.