What is remuxing?
Remuxing moves existing encoded streams from one container to another without encoding those streams again.
Think: change the package, keep the contents
An MKV file may contain H.264 video and AAC audio. If those streams are compatible with MP4, software can copy them into an MP4 container. The video and audio data can remain unchanged.
Simple example
This is often much faster than transcoding because the media does not need to be decoded and encoded again.
When remuxing is not enough
The destination container must support the streams you want to copy. Subtitles, unusual audio codecs, attachments or metadata may also need special handling. If the target device cannot decode the existing codec, merely changing the container will not solve the playback problem.
Does remuxing lose quality?
Not when the audio/video streams are copied unchanged. Their encoded data remains the same; only the surrounding container structure changes.
Common confusion
Remuxing changes packaging. Transcoding changes the encoded media.
A real remux rewrites the container structure.