Adverb modifying a verb:
* The children happily played in the park.
* She happily accepted the invitation to the party.
* He happily walked his dog every morning.
Adverb modifying an adjective:
* They were happily married for 50 years.
* He felt happily content with his life.
* The dog was happily wagging its tail.
In a phrase:
* Happily ever after they lived in their new home.
* She walked down the aisle happily ever after with her new husband.
* We are happily living our best lives.
In a clause:
* I am happily married, and I am very grateful for my partner.
* Happily, the lost dog was found safe and sound.
* The team happily celebrated their victory.
The specific way you use "happily" will depend on the context of your sentence and what you are trying to convey.