The rule of thirds teaches you to split your image into thirds vertically and horizontally. Where those imaginary lines intersect is usually the best place to have your subject.
Using the rule of thirds will usually give you the most pleasing layout, but rules are made to be broken.
Unless you know how to break these rules however, I suggest keeping to them until you understand when and why a rule should be broken.
Framing your subject on or within the compositional lines is very important. The reason being is that our brain interprets images to be more pleasing to the eye when following the rule of thirds.
You can place an element in the center of frame, but can be difficult to get right. You can see here that the model is centered, but still utilises the Rule of Thirds as the middle third is filled and the bottom of her head is on the top third line.
Often composition is a complicated process made to look simple. People viewing the final image don’t necessarily know why they like it, it just has a feeling about it that captures their imagination. More complex composition is something that takes time to learn. But the more you practice the easier it gets. Often it’s a case of going with your instincts on what feels right and whilst some photographers have a more natural ability to identifying composition it is still something you can learn.