That's one of the most common mistakes English speakers make, so don't worry, you are not alone. :-)
Unlike English, which has a fixed word order (SVO), German doesn't need a fixed order. Only the position of the verb(s) is fixed. But there's something like a neutral word order, and if you deviate from that word order, parts of the sentence get emphasized (usually the first and/or the last part that is different from neutral word order).
So if you confuse the position of the verb(s), the sentence will look wrong. If you confuse the position of the other parts, it will just sound a bit unnatural if the emphasis doesn't make sense.
Rules for the position of the verb:
- In a main clause, the conjugated verb is in second position.
- In a subclause, the conjugated verb is in last position. You recognize a subclause by the first word, which is be a subclause conjunction ("weil", "obwohl", ...) or relative pronoun (e.g., "der", "welcher").
- Infinitives and participles are stacked at the end of the sentence in reverse order (before the conjugated verb in a subclause).
- "Proper" main clause conjunctions ("und", "aber", "denn", ...) can be thought of as being between the sentences or in "zeroth" position and don't count un rule (1). Adverbs used similarly to conjunctions ("deswegen", ...) do count.
- A subclause can occupy the first position in a main clause.
I can add examples on request if you need them.
The rules for neutral word order are quite complicated. Here are the three most important ones, which will cover the majority of cases:
- Nominative (subject) before dative before accusative.
- Time before manner before place. In English, the order is "place before time", so pay attention.
- A reflexive pronoun is placed as early as possible, but after the subject.
More rules can be found e.g. here