In English, a comma cannot connect clauses.  Instead use two sentences; a conjunction; a subordinate clause; or stronger punctuation.

a) Separate them into two sentences

I went to the park, it was very nice.

I went to the park. It was very nice.

My teacher was very angry, he told me to sit down.

My teacher was very angry. He told me to sit down.

b) Use a conjunction

I went to the park, it was very nice.

I went to the park, and it was very nice.

My teacher was very angry, he told me to sit down.

My teacher was very angry, so he told me to sit down.

c) Create a subordinate clause

I went to the park, it was very nice.

I went to the park, which was very nice.

My teacher was very angry, he told me to sit down.

My teacher was very angry, which made him tell me to sit down.

d) Use stronger punctuation

I went to the park, it was very nice.

I went to the park; it was very nice.

´╗┐My teacher was very angry, he told me to sit down.

My teacher was very angry: he told me to sit down.

Exercise

Think of ways to re-write these sentences:

1. He smokes, it is very bad for him.
2. We will go to the zoo, I like the animals.
3. She broke up with her boyfriend, she doesn’t love him anymore.
4. They ate the cake, it was delicious.
5. The cat fell over, everybody laughed.