can you please tell me how to fix my iphone 6?

it keeps switching off and on?
More details are needed.
Has the device experienced any physical damage? Dropped? Sat on? Run over by car? Gotten wet?
Have you tried a hard reboot of the device?
How much free space do you have on the device?
When did this start happening?
What happened to the device right before this started?

Original thread: https://forums.imore.com/threads/can-you-please-tell-me-how-to-fix-my-iphone-6.375155/