Chromecast is unique.
It uses a protocol called DIAL - discovery and launch - and runs just a browser with a player, and a network stack.
Yes, depending on your model phone or tablet, you can screen cast to it.
It allows you to get a lot of programming from a number of sources, without using your mobile device as anything other than a remote control.
Chromecast rocks.
Miracast has been around for a bit longer and is a failed specification. It has been built in to a number of devices but often in non-compatible ways with other devices. In that regard, it's like DLNA on a Samsung TV - yes, it's there, no, it doesn't just work.
Miracast has one use - screen casting a mobile device to a TV.
If you ONLY want to screen cast a Samsung, probably your best bet is Samsung's dongle made for exactly that.