The two fundamental data structures for representing graphs are the
adjacency list
the adjacency matrix
see http://en.wikipedia.org/wiki/Adjacency_list and http://en.wikipedia.org/wiki/Adjacency_matrix.
The articles also discuss the pros and cons of those two structures.