The process in which a relatively unspecialized cell acquires specialized features of an epithelial cell, any of the cells making up an epithelium.