Returning entries that contain both categories I'm creating a filter and would like to return entries that must contain multiple categories (and behavior, not or). A sample url would be /events?cat=2,3. 

{% set eventCat = craft.request.getParam('cat') %}
{% set events = craft.entries.relatedTo(eventCat).all() %}


Gives me "or" behavior and 

{% set eventCat = craft.request.getParam('cat') %}
{% set events = craft.entries.relatedTo('and', eventCat).all() %}


Doesn't give me any results.

(updated to reflect Craft 3 syntax, thanks Robin!)
Answer for Craft 2
Your final result should not look like relatedTo('and', '1,2') but
relatedTo('and, 1, 2')

Or
relatedTo(['and', 1, 2])

So you just need to do
relatedTo('and,' ~ param)

Keep in mind to code defensively, so you might want to check if your query param is not null or something
Answer for Craft 3
relatedTo(['and', ['element' =&gt; 1], ['element' =&gt; 2]])