Broadly speaking, anything that you do manipulate the indexing and ranking of your webpages in search engines amounts to Search Engine spam. How do I know whether my site is spamming or not?
Well, with Google that is covered in Google Quality Guidelines here
The important points are
Hidden Text and Hidden Links
If you have text or links which users cannot see, then you are in violation.
Cloaking or Sneaky Redirects
Automated Queries to Google
Load page with Irrelevant Keywords
Create multiple pages,domainsor subdomains with duplicate content
Pages with malicious behaviour like distributing malware, trojan etc