It originated from the practice of royalty and dignitaries being greeted with a red carpet laid out for them to walk on, signifying their importance and the respect they were being shown.
Here are some examples of how the idiom is used:
* "The company rolled out the red carpet for their new CEO." (This means the company went to great lengths to make the new CEO feel welcome and important).
* "The city rolled out the red carpet for the visiting dignitaries." (This means the city put on a special welcome for the dignitaries, with parades, events, and other gestures of hospitality).
The idiom can be used figuratively to describe any situation where someone is given a special and welcoming treatment, even if a literal red carpet isn't involved.