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.