You write code in a text editor (for example Notepad). There are many text editors that are better than Notepad though, because they are specialized for writing code. They print parts of the code in different colours, they format the code, they show you function parameters and auto-complete function names as you type them, and so on. Personally I use a program called SciTE for this, but there are many more.
To compile the code and create an exe you need a compiler. Because Allegro is a C library, you need to write the code in the language of C (or C++). To compile C code you need a C compiler and to compile C++ code you need a C++ compiler. Turbopascal is a Pascal compiler, so it won't do. A popular compiler for C and C++ in Windows is called MinGW. You need to get it! Once you have it installed on your system, you compile the code by runnin the "gcc" or "g++" program from the command line and give it all the right parameters (i.e. names of the source files, flags, name of the exe file, etc). You can also write a makefile that automates this process so you don't type the same command every time you need to compile.
There are also programs which combine a text editor and compiler (and other tools) in one complete package. Such a package is called "Integrated Development Environment" or IDE for short. One popular IDE for Windows is Dev-C++. Another popular, but a commercial one you need to pay money for, is called MS Visual Studio. So get one of those if you don't want to use a simple text editor and command line interface.