A warship is a naval vessel designed for use in war time, or adapted to carry armaments if the situation calls for it.
Examples of the former are plentiful, but for an example of the latter one could look at the armed merchantmen used for convoy protection in the Atlantic Ocean during world war two. Not designed as warships, they were nevertheless adapted to carry cannon to help see off enemy U-Boats. Many of these saw action during the Battle of the Atlantic.
Warships are sometimes referred to by the older name of man-o-war.