You can use the word "while" to connect two ideas which are different from each other. For example:
Some people enjoy spending their weekends relaxing at home, while others like to go out and do something exciting.
You use "while" this way mostly in formal situations. In more casual situations, "but" is more common:
She said she wanted to go to an Indian restauraunt, but I wanted to try the new Vietnamese place.