The following information should not be taken as legal advice but simply as information based upon general principles of law, which is intended to educate. As such, this information is not intended, nor should it be construed as creating any attorney/client relationship. If you need specific legal advice, please consult with a lawyer of your choosing.
Your question is inconsistent. If your name is on a car loan, as the question states, then you are either a borrower or co-borrower. If there is no loan against the car, then it is a relatively simple matter to get your name off the title (and thus the registration) by re-titling the car. If there is a loan against the car, however, and you are a signatory to that loan, the lender will not release you from your obligation under the loan until the loan is paid off. In that case, the easiest solution, if possible, would be for your ex-boyfriend to get a new loan, in his name only, and pay off the existing loan on the car. At the same time, you could be removed from title.