Write as many functions as you think are necessary.
You should have a main method, just like any program. You'll also want to use a two dimensional array for the board (ie.
int board[3][3];.
Inside your main method, you'll want a "game loop". Something like this.
CODE
int game_running = 1;
...
while (game_running)
{
/* Do game stuff. */
}
.
Inside your game loop, you'll want to do several things.
First, you'll want to print out the board (writing a function to do this would be good). Then you'll want to ask for user input (ie. which space to move to).
At the end of every loop you'll want to check if there's a winner (perhaps another function?). If there is no winner, you'll want to increment the turn.
Turns can be kept with an integer, like
int turn = 0;. Incrementing the turn then would be as simple as
turn++;. To determine which player needs to move, you could use modulus division.
For example, if
turn % 2 equals 0, it is player one's turn (because turn divided by two has a remainder of zero, therefore turn is an even number, and player one started on an even number). If it equals 1, then it's player two's turn.
Lot's of people make tic-tac-toe as their first game. If you want more help, I suggest you look back at old threads (use the search function).