IS Receiving text messages is this legal while driving?

it is legal in some states it is illegal to text while driving