The opening prologue to the Gospel of John are some of the most beautiful and inspiring words in scripture to me. Some believe this was a Hymn added later to the Gospel, but it is so similar to the beginning of 1 John (That which was from the beginning) that it makes sense that the opening prologue was written by John to introduce his subject.
In the begining was the Word and the Word was with God and the word was God. How beautiful that sounds and how reassuring. So much is introduced to us in that on sentence. The first statement, in the begining takes us back to Genesis and reminds us that God had all this planned and that the old covenant was just there to prepare the way for the new covenant.
We quickly can see that the word is Jesus because in John 1:14 it states that the Word came in human flesh and was the son of God. We also see that Jesus was with God in the beginning. Look at Genesis 1:26 “Let Us make man in our Image.” We can now see that Jesus was there when God created everything. Then we see that the Word was God. There is no way a person can read the Gospel of John and deny the doctrine of the trinity. John states it matter of factly right here in his opening and goes on to back it up in several other places. (see John 6:46, John 20:28, John 14:9, 1 John 5:20)
So in the first sentence we have seen that Jesus was in the beginning with God and was God but in verse 2 John wants to make sure we realize that while Jesus is fully God he is also separate. He states this in reminding us He was with God. In verse three we see that everything was made through Jesus. If you are reading a KJV it says by; but the word dia (dee-ah’) here means through and is just there to help us try and grasp how Jesus is God yet also a separate presence of God.
So in simplified terms the first three verses of John are there to help us realize that Jesus has been around with God since the begining and to get us started on understanding the first two persons of the trinity.