First you have to know which carrier it is locked to.
Second purchase an unlock code from [https://www.ebay.com/sch/i.html?_odkw=droid+3+unlock&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR2.TRC1.A0.H0.Xmoto+g3+unlock.TRS0&_nkw=moto+g3+unlock&_sacat=0|Ebay], or if you are no longer on contract, and the phone is paid off, the carrier will unlock it for free.
As an agreement from Verizon to the US government, these phones should be sold unlocked, or they should unlocked them without any hassle.