If it is, in fact, just the visa in one’s passport that has expired and not the H1B status, itself, then there is no need for concern. The visa is a travel document only. If the visa in one’s passport expires, one would need to apply for another visa at a U.S. consulate abroad the next time s/he travels outside the United States.
Generally, one’s legal status in the U.S. depends upon the expiration date on the I-94 card, written by the immigration officer at the port of entry. As long as the latest I-94 card (either a small white card typically stapled in the passport or an updated one located at the bottom of the latest approval notice) is currently valid, and one is continuing to work for the sponsoring employer under the terms of the petition, then s/he is legally permitted to be in the U.S., whether or not the visa in the passport has expired. If it is, in fact, the status (as indicated on the I-94) that has expired, one should contact an attorney immediately to discuss available options.