Hadoop needs to be able to serialise data in and out of Java types via DataInput and DataOutputobjects (IO Streams usually). The Writable classes do this by implementing two methods `write(DataOuput) and readFields(DataInput).
Specifically LongWritable is a Writable class that wraps a java long.
Most of the time (especially just starting out) you can mentally replace LongWritable -> Long i.e. it's just a number. If you get to defining your own datatypes you will start to become every familiar with implementing the writable interface:
Which looks some thing like:
public interface Writable {
public void write(DataOutput out) throws IOException;
public void readFields(DataInput in) throws IOException;
}