how bitcoin mining works The way I understand mining is that you hash the previous block hash with the new transaction files and a variable to get certain amount of zero in the hash. So the stronger your hash power is the faster you find the new block hash. My problem is that thinking about it this way means that only the one with the highest hashing power will find the block first and get rewarded, then what are the others with lower hashing powers doing ? and how do they get rewarded ?

and do you get rewarded when you find the hash or you get rewarded every second of mining proportionally to your hashing power ? because the websites that offers hashing powers shows your balance to be continuously increasing and not as expected to increase step by step with each hash found.
The way I understand mining is that you hash the previous block hash
  with the new transaction files and a variable to get certain amount of
  zero in the hash.


You have chain A-B-C-D- , you create a new block, E, with its header (with variable called nonce and a reference to D's header hash) and body (the new transactions). You change the nonce in E's header and then hash the header. This hash should have certain amount of zeros.


  So the stronger your hash power is the faster you
  find the new block hash. 


True, but searching the correct hash means guessing the nonce from entire range of nonces, and everybody guesses their own variable. So the fastest computer will only have highest number of guesses. This doesn't mean someone else with only a few guesses won't guess it first. Like in a lottery, the guy who buys 1000 tickets is not sure to win comparing to the guy who bought 2 tickets, he just has better odds.


  and how do they get rewarded ?


Only the one who guessed the hash is rewarded.


  because the websites that offers hashing powers shows your balance to be
  continuously increasing and not as expected to increase step by step
  with each hash found.


If this site is a mining pool it gives rewards by some strategy, rather than giving the reward to the one who finds the hash at the moment when he finds the hash.