Ramming into another ship is one of the few ways to inflict damage, the others being towers and abilities. To ram the enemy, you only need to make the front part of your ship hit the opponent. You can ram any enemy you can reach, including shipyards, and opposing towers.
The damage of ramming is affected both by two different things, speed and ram damage.
Both of these can be increased, through fleet research, system points or as qualities of the ship hull. because Corvettes have the highest speed, they have the capabilities for ram damage.