The branch of mathematics studying networks is called graph theory. Graph and network are more or less two words for the same thing, but mathematicians can be picky about exact definitions. A graph is composed of two parts: a set of things called vertices and a set of edges representing connections between those vertices.
What is a vertex? It's a mathematical object whose sole purpose is to be connected to other vertices. In other words, it's pretty much the same thing as a node. In order to tell vertices apart, it is necessary to give them some kind of label. These labels could be anything, but let's call them v1, v2, and so on. It's a common convention to call a set of vertices V. Mathematically, this can be written using the following set notation, where N is the number of vertices in V:
V = {v1, v2, ..., vN},
Connections between vertices are called edges, just as in NetworkX. For undirected graphs, an edge is a set of two vertices. Elements in a set don't have a particular order, so {v1, v2} is the same as {v2, v1}, which makes sets good for undirected graphs. For directed graphs, order matters, so an edge is represented by an ordered pair of vertices. For example, (v1, v2) and (v2, v1) represent edges pointing in opposite directions. A set of edges is typically called E. Weighted edges can be represented in many ways, but one of the most practical is using a mathematical object called a matrix.