A conjunction used to introduce a fact that is contrary to what one might expect from the preceding context. Often translated as 'however', 'but', or 'even so'. It can also mark an unexpected turn of events.
彼は一生懸命勉強した。ところが、試験に落ちてしまった。
He studied very hard. However, he failed the exam.
天気予報では晴れだった。ところが、急に雨が降り出した。
The weather forecast said it would be sunny. But it suddenly started raining.
I thought he wouldn't come, but he showed up right on time.