Refer to Step-by-Step Construction of Gene Co-expression Networks from High-Throughput Arabidopsis RNA Sequencing Data. The section 3.12 Calculating Correlation of Gene Expression for Every Pair of Genes explains the steps.
I don't know much about co-expression networks, but maybe this can helps you : https://medium.com/@JavierBurroni/visualising-correlations-using-graph-2169c6415427
You can build a network with the igraph library (available python or R), from an adjacency matrix obtained by simply applying a threshold on your correlation matrix.
However you obtain a correlation network, not sure if this is enough to call this a co-expression network