What are the pros and cons of having higher/lower dBi and dBm?
The thing you need to start researching is called link budget. Your range depends directly on receiver sensitivity, your equivalent isotropic radiated power (EIRP) and the path loss. 

The basic formula looks something like this: \$P_{rx}=P_{tx}+G_{tx}+G_{rx}-L_{path}-L_{system}\$, where the \$P_{rx}\$ needs to be greater than a certain value. 

When you're calculating EIRP, you add the transmit power (in dBm) to the antenna gain (in dBi) and then subtract system losses, such as coaxial cable loss, connector loss etc. So the formula for EIRP is:\$EIRP=P_{tx}+G_{tx}-L_{system_{tx}}\$

Then you subtract the path loss in dB (there are calculators for that on the Internet, but as a beginner, don't expect to know enough to be able to get realistic results) and then you get the power available at the receiver's location.
To get the actual power at the receiver, you need to add the receiver's antenna gain (in dBi) to the power at receiver's location and also subtract the system losses at the receiver's site. 

So how do transmitter power (in dBm) and the antenna gain (in dBi) work?  

Well, antenna radiates power out and also focuses power in certain direction. The dBi value is the "gain" you get in the direction in which the antenna has maximum radiation compared to a "reference" antenna that does not focus power and instead just radiates equally in all directions. So the higher antenna gain is, the longer range you'll get, if the antenna is pointing in the direction in which you want to have long range. Also, if you go to some extremely high gains, it can get a bit complicated to actually aim antenna properly. 

On the other hand, the transmit power is just that: power of the transmitter. You can compensate for a weak antenna by increasing transmit power or you can compensate for weak transmitter by increasing antenna gain. Of course, more transmit power needs more electricity, which can be important for small, portable devices. 

It's a bit difficult to go into more details when explaining things to someone who has no background, but just keep in mind that different combinations of antenna gain and transmit power can work well in different situations. For example, if you're building a short-range system, where you have a fixed base-station communicating with small mobile stations, then it's a good idea to have large antenna gain a the base station, so that you can hear the mobile stations well, and also have low transmit power, so that you do not create too much interference for others.