Hi, Viboth
Answer to your question depends on what do you actually mean by "what is the difference"
Speaking generally, those words represents 2 different IOS commands and 2 different concepts.
Service instance is the way of logical mapping of traffic (based on VLAN tag let's say) to L2 or L3 instance. Also this approach helps us use single physical port as combination of logical L2 and L3 services.
Xconnect in general can refer to any connection between two network points where low-level traffic (e.g. L2) goes via high-level infrastructure (e.g. L3). But usually we mean using of L2TPv3 or AToM.
Using xconnect, you can bring together 2 service instances configured on different network endpoints.
If you could lay out the specifics of your question, maybe I can provide you more useful information.
BR,
Nataliya