i have two poliwags and they're both leveel 40 but one has 94 hp and the other has 88 hp
This is either because of EVs (If you have trained them by level up) and/or IVs (If you caught them at that level). EVs and IVs are rather complicated try looking at the following pages for info on them.
EVs: http://pokemondb.net/ev and http://bulbapedia.bulbagarden.net/wiki/Effort_values
IVs: http://pokemondb.net/mechanics/hidden and http://bulbapedia.bulbagarden.net/wiki/Individual_values