竟然 expresses surprise at something unexpected. It can be positive or negative surprise. It's stronger than 居然 (jūrán), which is interchangeable but slightly softer.
grammar
竟然 is placed before the verb: subject + 竟然 + verb. It often pairs with 没想到 (didn't expect that).