Homing is the process where the machine finds all the limits of the 3 axis (at the endstop switches), to have a common reference point for each axis. From the endstops, firmware defined values exist to give the printer head the offset to the home position, also known as origin (X=0, Y=0). If the origin position is in front of the plate, wrong offsets may be defined, but you can re-adjust the position.
If the stepper is driving the printer head away from the endstop on a particular axis on homing (in your case the X direction), there might be a few possible problems at hand:
- The stepper cables are plugged in reversed
- The wires in the stepper cable are switched
- The stepper direction is reversed in firmware (this is not very probable for a kit or bought printer)
- The stepper motor itself is build mirrored (not uncommon mistake for Y stepper motors on the Anet A8)
A quick fix would be to rotate the connector 180° of the cable going into the X stepper, if this works, you can disassemble the cable and properly arrange the stepper wires.