Creating a map, and map format can be complex, depending on how advanced you want it, since, the player will be looking at the map screen more than most other screen in the game.
Without writing 20 pages worth of code and tutorial, here's and extremely basic and stripped down way I've used in my RPGs (no events, no npcs, no monsters, etc)

well umm, to start you need a structure, something like:

type
TMap = record
Tiles : array[0..39],[0..39] of byte;
end;

var
Map : TMapdata; //use for the map
MapFile : file of TMapData;//use to save/load the file

----
You need to create a tileset, with a maximum of 255 tiles.
You will also need to make map a program (a Map Maker), that will easily let you populate the Map with numbers to tiles.
---
There are two ways of drawing the map to screen, the slow-less memory using way, or faster-more memory consuming way. I prefer using a bit of memory to make the game go faster so thats what I'll try to explain.
When you load the map, you need to loop through map array and copy tile by tile, using the number in the array as an offset to the tile, to an offscreen bitmap (preferable an offscreen DxDrawSurface).
So, the map will be drawn to and stored as one big picture to an offscreen surface. Then you just copy, or draw from the offscreen surface to the main Dxdraw surface, then draw your sprite, and flip.

Ok, that's a very simple and rather vague example. But if anyone would like more explanation, I'd be happy to go into more detail and provide some actually working code.