It is used to introduce a contrasting idea or statement.
Here are some examples:
* "The weather was terrible, however, we still had a good time."
* "I wanted to go to the beach, however, my friends wanted to go hiking."
* "He tried to study for the exam, however, he couldn't focus."