Clarification on setWaitForActiveShards method

I would appreciate if someone who knows can clarify the exact semantics of ClusterHealthRequestBuilder# setWaitForActiveShards(int waitForActiveShards) method.

Is the waitForActiveShards argument the number of seconds to wait for an active shard before giving up or something?

or it the number of shard to wait to become active before proceeding?

And what exactly is the operation being in "wait" for?

So let's say:

  1. programmatically I create an Index,
  2. then I set waitForActiveShards to 1
  3. then I query the index

I am guessing step 3 would be delayed based on the semantics of step 2?
Is it actually delayed? or the operation in step 3 is "buffered" up?