Most carriers will unlock a device for free once it is fully paid off and has been active on their network for a specific period (typically 40 to 60 days).
If your phone is "blocked" because it only works with one network (e.g., T-Mobile or AT&T), this is a software restriction called a . can you unblock a blocked phone