Multiplexers or mux are very important component in digital electronics. A 4-input mux is shown below..


Functionality of mux is very simple. The select-line, selects which input should be passed to the output. All other inputs which are not selected are ignored. A analogical diagram below shows how mux works..


If the select line is "00", and till it remains "00", only the "input 0" will be selected and seen at the output. Any changes at "input 0" will immediately reflect at the output as if they are wired. Similarly for select line "01", "input 1"; for select line "10", "input 2" and for select line "11", "input 3" will be connected to the output.

Below is shown how a simple 2 input mux can be constructed using basic gates...