Saying your house is "neat as a pin," or that running a marathon is "a piece of cake" are examples of what?
The expressions create an analogy or comparison between two dissimilar things.
Running a marathon actually is not easy. While eating a piece of cake is easy.
neat as a pin is possibly a reference to a pin being used to sew up and make things neat. That the house is neat is then an analogy to the house being sewed up and completely clean.