It's not pointing to your walking direction or nearest portal, neither to north. But it's changing the direction and i can't figure where/why.
If you mean the red and white double-ended pointer in the top-left of the screen, directly below the section with your level and XP, then that is a compass pointer and certainly should be pointing North, either to your North or the map's North. If it's not then maybe you need to calibrate your phone's compass.
Alternatively, if you mean the coloured triangular pointer (I think the colour depends on your faction) near the middle of the screen, then that should be showing your current (approximate) position, and it should be pointing in the direction that you're facing (again if it's not, then you may need to calibrate your phone).
You can tap the compass symbol in the top-left of the screen to toggle between the map showing North-up (so the compass pointer in the top always points straight up and the triangular pointer near the middle turns to show which way you're facing), or tap again to have the map rotate as you turn round (this means the triangular pointer always points up, and the compass and map rotate as you turn around).
If you're moving, then the triangular pointer also has a trail of light grey copies of itself that show your movement trail, and give an approximation of the speed you're moving at by the distance between them.