For making a flash game, you will either need Flash itself (which is rather expensive. Easily over 100€) or
>FlashDevelop<, which is free. It's not as fancy as flash, but many flash programmers favor it for it's simplicity.
A popular framework for flash (which is sort of like an engine) would be
>Flixel<.
For a simple game you can either use gamemaker as bamboori pointed out, or
>Stencyl<, with which you can create flash games, but without much of the programming part. However, I don't know whether you learn much from using those programms that help you for more "advanced" games.
If you want to create a game with Java, C++ or the like,
>this page< provides a lot of information.
For 3D games you could use an engine such as
>Unity3D<, but I always felt like creating 3D games takes a lot more time than 2D ones. Not to talk about 3D modelling and stuff.