Composition is tricky business: there are rules to follow, but they are not hard and fast per se. Nevertheless, knowing them is a great starting point, and this helpful video will get you up and running.
Coming to you from Mango Street, this video goes through the basics of composition, perspective, and framing. We all know the rule of thirds, but it's not all there is to photography, and knowing how compositional guidelines can work in tandem or replace one another can lead to more interesting shots. I personally love straight-on, centered portraits, but there's a time and place for those. As the video mentions, good composition is really about creating an image that draws the viewer's eye to the correct spot effectively, so if there is a better way to do that that goes against the so-called "rules," that should take precedence. For example, notice how leading lines typically take priority over a thirds-based composition, often leading to more extreme proportions. Take time to experiment with compositions and go beyond the basics.
If you'd like to dive into the fundamentals of photography more, be sure to check out