Latch inference in Verilog occurs when an output variable inside a combinational always block is not assigned in all possible branches of the code. For example, if an if statement assigns a value to an output when a condition is true but there is no else branch assigning the output when the condition is false, the hardware infers a latch to remember the previous value. This is because the output must hold its value when not explicitly assigned. The execution table shows that when enable is 1, the output is assigned, but when enable is 0, the output is not assigned, causing latch inference. To avoid this, always assign the output in every branch, including else, or provide a default assignment at the start of the always block. This practice ensures the output is always driven and no latch is created. Understanding this helps write correct combinational logic without unintended memory elements.