The ratings start out at a default of 1200 ELO. They begin to settle into your true rating after you play a number of games, so expect your first few games to make your rating fluctuate quite a bit. Once you get a number of games under your belt you will notice that your rating will begin to steady out and each game will change your rating only slightly. Check out the following two links:
http://en.wikipedia.org/wiki/Chess_rating_system
http://en.wikipedia.org/wiki/Elo_rating_system
Hope that helps, and welcome to the site! 
I am new to Chess.com. I have played few games of online chess with a friend, and see that, from the outset, we are both given ratings, updated after each match. I would be grateful to any member who can advise me as to how the ratings are calculated.