There are several sites on which you can play Battleship online for free, including Battleship Online, Knowledge Adventure and Battleship Game. Each site offers slightly different features and presentations of the classic board game, ranging from a very basic grid to 3-D animated ships.
Knowledge Adventure allows you to play against a simulated or computer generated opponent. The other two sites generate battles between random users, or you can locate and play a person of your choosing. At all three sites, the basic premise does not deviate from the classic game: Position your ships around a grid and take turns with your opponent firing at the grid to hit or miss, trying to sink all your opponents ships before they sink yours.