Breeding is a very complicated subject within Pokémon. To break it down piece by piece, one needs two compatible Pokémon of the opposite gender in the Day Care. Compatible Pokémon are based on their Egg Group, and the most common way is by placing two of the same species in the Day Care.
The Egg will hatch into whatever species the female Pokémon who bred them was, or, in the case of the mother possessing the final evolution, the basic stage of the Pokémon species. Of course, there are exceptions—such as Chansey, who you would need to give a Luck Incense for her to produce a Happiny Egg. Otherwise, she would give a Chansey Egg.
As that is not the case, though, if you wanted to hatch a Feebas, you would need to breed a compatible male with a female Milotic or Feebas.
Because Ditto can Transform into any and every Pokémon and they have no gender as their basic form, they are the ideal Pokémon to fall back on when you want to have an Egg of a species you already caught. If you have a male Poliwag and Breed that with a Ditto, the Ditto would automatically Transform into another Poliwag rather than another Pokémon. That is why you would not obtain a Feebas Egg if you were to breed a male Poliwag with a Ditto.
Also note that passable moves are from the father of a Pokémon. Ever heard of the term Chain Breeding? It's when Pokémon are bred specifically for the purpose of having moves they can only learn as Egg Moves. If you are interested in learning more about it, here is a page that explains the basics of Chain Breeding:
http://bulbapedia.bulbagarden.net/wiki/Chain_breeding