There are 3 different locations to place CSS code:
A. CSS rules can be placed inline (within the body section of your html document) the same way as html formatting.But these inline styles are avoided as they would repeat and add to your source code in the same way as html formatting does. Also updating any style rules on your web page(s) would be very time consuming.
B. By placing style rules in the head section of your html document you can apply them without repeating and are able to update values a lot quicker.
C. CSS code placed in a separate, external style sheet which can be linked to any page in your web site makes the task of updating numerous web pages easy.