If I use an Arduino with a WiFi shield, can I connect to a digital ocean server and receive data from it? How would I go about doing this?
Depending on what you need Wifi for you should look at the ESP8266 modules.
You may find that you can just use one of those without an Arduino.
You can still write the code and program in the IDE.
But YES a WiFi shield will give your Arduino the ability to connect to the internet and send or receive data. Plenty of existing examples to get started with.