Difference between switch.publish_state(true) and switch.turn_on

I am confused about the difference between these two ways of turning on a switch?

When would one use publish_state?

Thanks

One is more for use in a lambda and the other is not. They’re both basically do the same thing.

Many thanks