How does an H-bot printer work? I’m thinking of building a diy H-bot printer but I have some questions...

How can I tell the firmware that the printer is an H-bot one? I just need to uncomment the CoreXY option? Is it the same?

Does the print bed need to be square (for example 300x300) or it can be also a rectangle?

Are the steps/mm the same of the ones on a Cartesian 3D printer?

How can I recognize which motor goes on which connector on the motherboard? (The X and Y connectors I mean).
The CoreXY kinematics can be seen as an evolution of the H-bot kinematics. In Marlin, you both need to configure the printer as a CoreXY machine. Note that your steps are determined by the pulleys in the steppers and need to be the same for the steppers. With testing you will find out if you have the correct value.
There are many popular designs out there; e.g. the Hypercube and the Hypercube Evolution (I have built the latter myself).
I would not recommend building an H-bot, these have an inherent design flaw in that the load is asymmetrical causing the carriage to be stressed by a torque causing racking. To minimize this racking, you would require more expensive tight tolerance hardware like proper linear rails (usually not the kind that you find on typical auction or Asian vending sites, but actual pricy Japanese or German hardware). The CoreXY kinematics stress the carriage symmetrically. Note that the difference between an H-bot and a CoreXY printer is only the length of the belts, nowadays good quality belts can be bought for any length you need.
Note that a square or rectangular bed is a non-issue, just specify the dimensions in the configuration. The only thing you need to find out is how to wire the steppers. I connect one stepper to one driver and the other stepper to the other driver. I then did some tests and found out I had to flip one stepper motors connector to get the correct movement. I could have reversed this in firmware as well.