Sorry, I dont understand what you mean. The Oscillator is running, as my code is executing and LED's are blinking.
I see you've already fixed this, but just to be clear what the problem was, this line
#pragma config FEXTOSC = HS // External Oscillator mode selection bits (EC above 8MHz; PFM set to high power)
turns on the external oscillator, so RA6 and RA7 are dedicated to external oscillator use..
#pragma config RSTOSC = HFINT32 // Power-up default value for COSC bits (EXTOSC operating per FEXTOSC bits)
tells your PIC to use the internal oscillator, but plainly the code has been changed without changing the comment, which still says the external oscillator is being used.
I think its because the pins are analog capable, and are giving an analog signal out. How can I make them give a digital signal out? (i.e 5V on high)
"analog capable" refers to the input capability, not output.
All "analog capable" pins power up in analog mode, and will read as zero if you try to do a digital read of them before switching them to digital mode (via the matching ANSELx register).
As jtemples pointed out, do writes to LAT registers, not PORT registers. It doesn't matter so much when you write an entire port (e.g. PORTC = 0), but it is critical when you write an individual bit.
So, instead of
RD0 = 1;
LATD0 = 1;
Get into the right habit now. If you do it the wrong way, it will sometimes work, and sometimes fail, and cause you hours of fruitless debugging!
And finally, as CVM mentioned, turn off the WDT.
Do NOT enable it until you understand how it works, and what it is for. Otherwise as mentioned it will keep resetting your PIC every two seconds.