My friend wasn't home.

Literal

Friend [topic-は] absent was-[plain-だった].

留守 ('absent, not at home') is a noun — literally 'keeping guard,' which originally meant 'being left behind to guard the house' — now inverted to mean 'being away from home.' 留守だった ('was out') uses the past copula with the noun. A surprisingly compact way to say a common thing.