to visit sb or to send a message of good wishes as a sign of respect for them
pay your respects (to sb)
to visit sb or to send a message of good wishes as a sign of respect for them
Many came to pay their last respects (= by attending sb's funeral).
Definitions from the Oxford Advanced Learner's Dictionary, 9th edition