How to cook baby octopus?
This recipe for Grilled Baby Octopus has instructions for cleaning them.  You can either cut off the heads, or if you choose to retain them:


  Make a shallow cut along the head, being careful not to cut too deep
  and puncture the innards. Carefully but firmly pull out everything
  inside. Cut the head off, turn it inside out and use a knife to scrape
  away the innards.
  
  In both cases, if a small black, triangular beak does not come out
  along with everything else, then push your finger up through the
  middle of the body and the beak should pop out. 


As explained in this question, you will want to cook octopus very briefly so it does not get rubbery, or for a long time, to move past the rubbery stage.  If, as mentioned in the question, you wish to fry them, the cooking time may be around one minute.  Some recipes suggest 2-3 minutes per side.

For specific recipes, you can google "baby octopus recipe".