Most commonly means to somehow find a way out of a serious charge (murder, robbery, drug dealing, assault), usually with the help of a top tier lawyer or entity of authority.
Richard : * shoots Sean and kills him, ends up going to court and wins the case *