By Newton's second law, the net force acting on the block in the vertical direction is
∑ F [ver] = n - mg = 0
where n = magnitude of normal force and mg = weight of the block. It follows that n = mg.
When the block is at rest, the applied force X will not be enough to move the box until it can overcome the maximum mag. of static friction. If µ[s] is the coefficient of static friction, then the maximum mag. of the frictional force is
f = µ[s] n = µ[s] mg
The net horizontal force would be
∑ F [hor] = X - µ[s] mg = 0
so a minimum force of X = µ[s] mg is required to get the block moving. Any mag. smaller than this and the block stays at rest/in equilibrium.
Once the mag. of X exceeds µ[s] mg, the block will begin to move. At that point, if the coefficient of kinetic friction is µ[k], then the net force on the block is
∑ F [hor] = X - µ[k] mg = 0
so a minimum force of X = µ[k] mg would be needed to keep the block moving at constant speed, or otherwise X = µ[k] mg + ma if the block is accelerating with mag. a.
The principles here are captured in the attached plot.