I thought this was a duplicate, but I cannot find a post to flag. In lieu of that, takeTake a look at the Custom Metadata Types Implementation Guide on page 14.
Use SOQL to access your custom metadata types and to retrieve the API names of the records on those types. DML operations aren’t allowed on custom metadata in Apex, the Partner APIs, and Enterprise APIs.