Is a true neutral character restricted by alignment from casting a spell that is, say lawful or chaotic, or can he/she cast a spell no matter if its affected by an alignment. (A lawful character can't cast a chaotic spell and a good character can't cast an evil spell, vice versa)
Only Clerics really care
Clerics cannot cast spells of an alignment opposed to their own. A TN cleric has no opposing alignment and, as a result, can cast aligned spells freely.
Casting a spell with an alignment descriptor - like [Lawful] - counts as committing an act of that alignment, no matter what you used it for. Cast enough such spells consistently and you'll see an alignment shift take place. This is true for any character, even if they cast the spells from wands or scrolls.
YES but there are some limitations if you are a Cleric
If your cleric is not devoted to a particular deity, you still select two domains to represent his spiritual inclinations and abilities. The restriction on alignment domains still applies
In 3.5 there was the limitation that only Clerics with Neutral Deities could be Neutral (except the ones without a patron Deity):
player handbook p.31 (3.5) states (in the Alignment section of the Cleric):
A cleric may not be neutral unless his deity’s alignment is also neutral.
In pathfinder however this is mentionned (was present in 3.5 too) without the restriction that was in 3.5:
Alignment : A cleric's alignment must be within one step of her deity's, along either the law/chaos axis or the good/evil axis.
If you are indeed True Neutral :You can cast any spell with alignments you want. But... if your Deity is not True Neutral (if you do have a Patron deity) I would not recommend casting spells that goes against your God's alignment... because that's prohibited:
Chaotic, Evil, Good, and Lawful Spells: A cleric can't cast spells of an alignment opposed to her own or her deity's (if she has one). Spells associated with particular alignments are indicated by the chaotic, evil, good, and lawful descriptors in their spell descriptions.
So if you are True Neutral and your God is Neutral-Good, forget evil spells... or Chaotic spells if your God is Lawful Neutral etc.
And you can't take Alignment Domains:
Deity, Domains, and Domain Spells: A cleric’s deity influences his alignment, what magic he can perform, his values, and how others see him. A cleric chooses two domains from among those belonging to his deity. A cleric can select an alignment domain (Chaos, Evil, Good, or Law) only if his alignment matches that domain.
If your Deity is Either: (some exceptions exist though) Neutral-Good,Neutral-Evil,Chaotic-Neutral or Lawful-Neutral, you could be True Neutral in Pathfinder.
Casting spells with alignment descriptors is fine since you are neutral(if you don't have a particular Deity or if the God is True Neutral or if it's on the axis that the God is Neutral) but be sure to be balanced in your actions as Lord_Gareth warned you.