I believe that the underlying neural processes that give rise to discoveries and inventions are the same. However, (not to be taken too seriously) here are a couple of rules of thumb:-
Discoveries do not add to what was there already, inventions do.
Discoveries make the world more simple inventions make the world more complicated.
I will take as starting point the definition of invention from a legal perspective(though I am no lawyer. My disclaimer :-). In the US law (a different definition may apply in other countries but because of WIPO I would believe an alternate definition will not vary that much) an invention is defined as :
" any art or process (way of doing or making things), machine, manufacture, design, or composition of matter, or any new and useful improvement thereof, or any variety of plant, which is or may be patentable under the patent laws of the United States.".
A discovery on the other hand is more broader, you can discover an algorithm, a mathematical formula, a physical law of nature, a biological process, etc. These are not inventions but are natural phenomena that is discoverable. An invention is also a discovery, and if you want to subcategorize it, then you can call it an invention. A mathematical algorithm or natural law cannot be an invention as per the legal definition given
when a thing is already exist and anyone work on them and reveal it called discovery and when a thing actually not exist and anyone creat or make them called invention
Discovery is finding out or figuring out something that preexists, while invention is using objects that preexist to create something new that is first of its kind.
Please, look at this paper: http://www.informationphilosopher.com/solutions/scientists/mach/accident_in_invention_and_discovery.html. The achievement of the discoverer consists in his sharpened attention, which detects the uncommon features of an occurrence and their determining conditions from their most evanescent marks, submitting them to exact and full observation. More is required for the development of inventions: more extensive chains of images are necessary here, the excitation by mutual contact of widely different trains of ideas, a more powerful, more manifold, and richer connections of the contents of memory, a more powerful and impressionable psychical life. Hope it helps.
Invention is the process whereby new elements are createdoften out of previously existing element. Discovery is the process whereby we recognize or gain better understanding of alredy existing elements present in the environment usually through scientific research.