I intend to find the center of mass of a quadruped robot and find the
convex of the CoM inside the support polygon. I want to make a model
of this, which is further going to help me develop stable gaits for
the robot.
The question seems wrong to me. What I think you want to do is, find the COM of the robot and convex support polygon of the robot based on the gait. If you know your COM and calculate how your COM shifts based on the gait, you can find a suitable gait. A gait is stable as long as your COM lies inside the support polygon which is the polygon with the vertices described by the position of legs in contact.
I know of this formula $$x_{cm} = \frac{\sum_{i=1}^{N}m_ix_i}{M}$$
Where $M$ is the total mass, $m_i$ is the mass of each link. I'm
confused of what $x_i$ really is. Is this the distance of position of
the link on the $x$ axis?
This formula can be used when you have particles with given masses. There, $m_i$ will correspond to the mass of $i^{th}$ particle which is $x_i$ distance away from an origin (either defined by the system or you).
In robotics, we assume links to be particles with their entire mass centered at the Center of Mass (COM). It is easier to find the center of mass of a simple polygonal object and hence we first start with each link.
Let's say, the leg of the robot is defined by two links, upper and lower. The upper link of the robot is a cuboid (it is sometimes safe to assume even if the robot's leg is not perfectly cuboidal - you can assume a cuboidal hull over it) with all the vertices of the cuboid defined or measured in the world frame or another frame. If you have the robot, you can weigh each of those links or if it is in simulation you can specify the material or the inertia of these links depending on the software you are using to model your robot. Secondly, you can calculate the geometric COM of this cuboid.
Note, this COM position will be in the frame of the link from where you defined the vertices. If all the links' COM was defined in different frames, you will have to find the transformation to go from one frame to another.
Once you do this for all the links of the robot (the legs and the chassis), you can find the overall COM of this robot with the formula you have mentioned above (again, only use it when you have all COMs in the same frame of reference).
There is another post here, which explains a similar formula, what is
the term Pio? ( I couldn't ask this on comments since I don't have 50
reps. )
$P_o^i$ is same as $x_i$ and it is defined in the earlier equation which basically finds the position of the COMs of the link in the base frame. You may need to look into transformation of frames if you don't understand that equation.
This was actually a very fundamental question and I would recommend you to take an introductory robotics class to understand these things in depth. A classic start could be "Introduction to Robotics" taught by Prof. Oussama Khatib, Faculty at Stanford. It's available on YouTube for free.