In general, both of them mean sandwich, but "bocadillo" is used in Spain and "emparedado" in Latin America. If you use them in another way, the meaning could change (bocadillo in Latin America could mean snack, as it is said above) or people won't even understand you.